Simple Storage Service Flashcards
When creating an S3 Bucket, who can access it?
ONLY the Root User
S3 is completely private by default - just because a bucket is enabled, doesn’t mean it’s publicly accessible.
You must explicitly allow this via a bucket policy or an identity policy otherwise there is the inherent implicit DENY.
What is an S3 Bucket Policy?
This is a Resource Policy attached to a bucket which grants or denies access to that bucket or objects within that bucket.
What is the difference between RESOURCE policy and IDENTITY policy?
Resource based policies are basically inline policies but applied to an AWS Resource instead of a user (like S3 or KMS or SQS or SNS etc)
Identity Policies only work for identities (Principle) within the same AWS account.
REVIEW:
A good way to tell if a Policy is a resource policy or an identity policy is the presence of a Principal (the identity that the policy applies to) within the policy statement.
If it’s present –> it’s probably a Resource Policy.
How many bucket policies can be attached to an S3 bucket?
Only ONE bucket policy, but there can be multiple statements within that policy.
What is the “Block Public Access” setting when creating a bucket?
Allows you to create an “Open” bucket policy but only for valid AWS Identities - not for Public Access.
Anonymous users will still not have access even though the bucket is public.
Public access is granted to buckets and objects through access control lists (ACLs), bucket policies, or both. In order to ensure that public access to all your S3 buckets and objects is blocked, turn on “block all public access” at the account level. These settings apply account-wide for all current and future buckets.
Can you host Static Websites on S3?
Yes - S3 is great for static website hosting.
Offloads compute resources needed to generate changes/files/etc. and is also much cheaper.
When are you charged for Data in S3?
You are not charged for data going IN, only for data going OUT as well as anytime you retrieve data.
What is Object Versioning?
When you modify an existing Object within a bucket, a new version is created and made the “current version” of that object.
Is Object Versioning turned on by default?
Can you turn it OFF if so?
NO - it is DISABLED by default, and once it is ENABLED you can never go back to the disabled state on that bucket. If you want to permanently disable it, you just save the images, delete the bucket and re-upload to a new bucket.
You can however SUSPEND the feature, and once it is suspended it can go back into the ENABLED state.
What happens when you DELETE an object in a bucket with versioning turned on?
The object becomes hidden and S3 will add a “Delete Marker” which becomes the current version.
Keep in mind the objects are still there which costs $$. You have to permanently delete the objects by specifying an Object ID.
What is MFA Delete (in S3)?
Prompts S3 to require an MFA authentication in order for a user to delete an object.
This can help to avoid accidentally modifying/deleting important objects.
What is Single PUT Upload?
How big can the upload be?
This is default when uploading to S3.
The data get’s uploaded in a single “blob” or stream, of up to 5GB. If that stream fails for whatever reason, you must re-upload the entirety of that file.
What is Multi-part Upload?
Breaking up a single “blob” of data into smaller chunks to then upload in multiple streams.
This improves speed and also reliability - if any of the smaller streams fail, that piece can re-upload in isolation versus having to re-upload the entire file.
What are the specs of a Multi-part Upload?
- minimum size of ORIGINAL blob of data is 100MB
- maximum of 10K smaller streams
- streams range from 5MB to 5GB
What is S3 Transfer Acceleration?
Uploads & frequently accessed data is sent to Edge Locations instead of directly to S3. This way, the data will traverse Amazon’s CDN network versus going over the internet.
What two types of Encryption methods does AWS have?
Examples of each?
Crypto @ Rest - prevents physical theft/tampering. Data stored on shared HW is all encrypted.
Crypto in Transit - protecting data while it’s being transferred from point A to B. Data is wrapped in a tunnel before it is sent off.
Key Terms for Encryption:
Plain Text?
Algorithm?
Key?
Ciphertext?
Plain Text - text/images/app that’s human readable
Algorithm - code/math that takes data + a key and and creates encrypted data (ciphertext)
Key - password/handshake
Ciphertext - data that is encrypted by an algorithm
Asymmetric v. Symmetric Encryption
Which key can Encrypt data? What key can Decrypt data?
Symmetric - same key is used for encrypt/decrypt on both sides.
Asymmetric - key is not the same on both sides. This involves a PUBLIC and PRIVATE key. PUB key creates ciphertext but can never decrypt - only a PRIVATE key can decrypt data.