S3 Flashcards
What is S3?
Infinitely scaling storage. Allows people to store objects (files) in buckets (directories)
How must S3 buckets be named?
Globally unique name (across all regions and all accounts)
- No uppercase
- No underscores
- 3063 characters long
- Not an IP
- Must start with a lowercase letter or number
Is S3 a global or regional service?
Global, but buckets are created in a region
Are S3 buckets global or regional?
Region level
What is an S3 Object key?
the full path
What is an S3 Object key composed of?
prefix + object name
What is max size of an S3 object?
5TB (5000GB)
What do you do if you need to upload an object that is more than 5TB?
Multi-part upload
What is S3 Object metadata?
List of text key / value pairs - system or user metadata
What is S3 Object Tags?
Unicode key / value pair - up to 10
Useful for security / lifecycle
Do all S3 Objects have a Version Id?
Only if versioning is enabled
What are the types of S3 security?
- User based
- Resource based
- Encryption
What is used based security?
IAM policies - which API calls should be allowed for a specific user from IAM console
What are the 3 types of resource based security?
- Bucket Policies
- Object Access Control List
- Bucket Access Control List
What are Bucket Policies?
Bucket wide rules from the S3 console - allow cross account
What are Object Access Control Lists (ACL)?
Finer grain at object level
When can an IAM principal access an S3 object?
- The user IAM permissions allow it OR the resource policy ALLOWS it
- AND there’s no explicit DENY
What is Encryption S3 Security?
Encrypt objects in Amazon S3 using encryption keys
How to allow EC2 Instance access to an S3 bucket? (from EC2 Instance side)
Create EC2 Instance Role that has attached IAM permissions
Is there such thing as an IAM user for EC2 Instance?
No
How to allow IAM user from another AWS account access to S3 bucket?
S3 bucket policy that allows cross-account access
What is an S3 bucket policy made of?
It is a JSON based policy with:
- Resources: buckets and objects
- Actions: Set of API to Allow or Deny
- Effect: Allow / Deny
- Principle: The account or user to apply the policy to
What situations would you use an S3 bucket policy?
- Grant public access to the bucket
- Force objects to be encrypted at upload
- Grant access to another account (Cross Account)
By default are S3 buckets access-able by the public?
No, there are settings created to prevent company data leaks
Can S3 host websites?
Yes it can host static websites
What will the website url for a S3 website be?
.s3-website-.amazonaws.com
OR
.s3-website..amazonaws.com
What does it mean if you get a 403 error when trying to access you S3 website?
You need to make the bucket policy allow public reads
What level is S3 versioning enabled at?
Bucket level
What are the advantages of versioning your buckets?
- Protect against unintended deletes (ability to restore a version)
- Easy roll back to previous version
Is it best practice to version S3 buckets?
Yes
What will a file version be if it was created before versioning was enabled?
Will have version ‘null’
Does suspending versioning delete the previous versions?
No
What are S3 Access Logs?
When a request is sent to your bucket a log of the request is sent to a logging bucket that can be analyzed.
What is S3 Replication (CRR)?
Cross Region Replication - used for compliance, lower latency access, replication across accounts
What is S3 Replication (SRR)?
Same Region Replication - log aggregation, live replication between production and test accounts
Can you do S3 replication to a bucket in a different account?
Yes
Do you need versioning for S3 Replication?
Yes, in both source and destination
For S3 Replication, is copying asynchronous?
Yes
Are objects uploaded to S3 before replication is enabled copied over to the destination bucket?
No
What are the S3 storage classes?
- Amazon S3 Standard - General Purpose
- Amazon S3 Standard-Infrequent Access (IA)
- Amazon S3 One Zone-Infrequent Access
- Amazon S3 Intelligent Tiering
- Amazon glacier
- Amazon Glacier Deep Archive
What is S3 durability?
Very high, 99.99999999999 (11 9s) of objects across multiple AZ
Does S3 durability change for various storage classes?
No