AWS S3 Bucket (9, 10, 11) Flashcards
An S3 file has a full path of s3://my-bucket/my_folder/another_folder/my_file.txt … Which part of the path is the Key
The Key is my_folder/another_folder/my_file.txt
What is the max object size in S3? What is uploading max?
5TB; 5GB (recommended use multi-part upload after 100MB)
S3 Versioning will overwrite the previous file, true or false?
False. S3 creates a new version
Version ID for a file in a bucket is null, why?
We enabled versioning for the bucket after the object was added to the bucket
How can you restore a deleted object in S3?
Delete the version with a Delete Marker
What are the 4 methods of encrypting objects in S3?
SSE-S3, SSE-KMS, SSE-C, Client Side Encryption
What is SSE-S3 encryption for S3?
Encryption using keys handled & managed by Amazon s3; object is encrypted server side
What header must be set for SSE-S3 encryption for S3?
“x-amz-server-side-encryption”: “AES256”
What is SSE-KMS encryption for S3?
Encryption using keys handled & managed by KMS;
object is encrypted server side
What header must be set for SSE-KMS encryption for S3?
“x-amz-server-side-encryption”:”aws:kms”
What are the SSE-KMS advantages?
User control and audit trail
What is SSE-C encryption for S3?
Server-side encryption using data keys fully managed by the customer outside of AWS;
Amazon S3 does not store the encryption key you provide;
HTTPS must be used and the encryption key must be provided in every request
What is client-side encryption for S3?
Clients must encrypt data themselves before sending to S3;
Clients must decrypt data themselves when retrieving from S3
What two options for default encryption does S3 bucket provide for you?
SSE-S3 and SSE-KMS
What is User Based S3 security?
IAM policies - which API calls should be allowed for a specific user from IAM console
What is a Resource Based Policy?
Bucket policies - bucket wide rules from the S3 console - allows cross account;
JSON based policies
Which encryption method for S3 Bucket requires you to use HTTPS?
SSE-C
How can an IAM principal access an S3 object?
If the user IAM permissions allow it OR the resource policy allows it AND there is no explicit deny;
An explicit deny takes precedence over the IAM permissions allowance;
A bucket policy does not need to be created as long as there is no explicit deny
What are 3 use cases for S3 bucket policy?
Grant public access;
Force objects to be encrypted at upload;
Grant access to another account (Cross Account)
How can MFA (Multi-Factor Authentication) be used in S3 Bucket?
It can be required to delete objects
What is a pre-signed URL used for in S3?
They are URLs that are only valid for a limited time
You are getting a Forbidden when trying to upload a file on S3? What is a possible reason?
The bucket policy could be preventing it; e.g. files must be encrypted before/while uploading;
If it is a public upload, it could also be the Block Public Access settings
Users cannot access the object S3 URL with correct key path for your static website? What could be a cause?
When a bucket is created, it has the Block All Public Access option configured in the Block Public Access settings. You need to configure this and then create a Bucket Policy that allows users to Read the object (the static site object). Even if Block Public Access is turned off, you still need to create a Bucket Policy.
What is an origin in CORS?
An origin is a scheme (protocol), host (domain) and port;
e.g. https://www.example.com (implied port is 443 for HTTPS, 80 for HTTP)