S3 Flashcards
What type of storage is S3?
Object storage
What are S3 use cases?
Backup and storage
Disaster Recovery
Archive purposes
For hybrid cloud storage
Application hosting
Media Files
Data lakes y big data analytics
Software updates delivery
Hosting static websites
Where does S3 store objects in?
Buckets
What characteristics must a bucket name have?
It must be globally unique
Where are buckets located in aws?
In a specific region
Is S3 a Global Service?
No. Buckets are located in a region.
What is the naming convention for S3 buckets?
No uppercase.
No undesrcore.
Between 3 and 63 characters long.
Not an IP. Must start with lowercase letter or number.
Must not start with xn
Must not end with s3alias
Example name: bucket-leito123
What is the S3 object key?
The full path of the file (object)
Example: s3://my-bucket/my_file.txt
Example of key with directories (not really directories):
s3://my-bucket/my_folder1/another_folder/my_file.txt
Remember, the s3 UI makes it look like there are directories inside a bucket, but in reality there are just different keys, and some are longer and have / slashes, like the previous example: “/my_folder1/another_folder/”
The /my_folder1/another_folder/ path is just the prefix for the object name.
Key = prefix + object name
Can you have folders in s3?
Yes. Folders can be created inside a bucket to organize a buckets’ objects. The folder will be part of the object key.
What is the key prefix?
Part of the key. The prefix is the part of the patch that consists of the folders the object is in.
Key = Prefix + Object
Are there directories in buckets?
No. In the UI it looks like there are directories. But in reality there are just different keys to the objects inside buckets.
What is the max object size?
5TB
What happens when you upload a file larger than 5GB?
You must use the multi part upload
Why can you open objects with the “open” button in the aws management console, and not the public URL?
Because when you open an object with this button, aws verifies your user is the one opening it and it signs the request with your user, which owns the object.
What is an S3 object URL?
Every S3 object has a public access URL. To which you need to enable access. Objects are not public by default.
How does security work in S3?
Security is centered around access to S3 objects.
It can be user based or resource based.
User based security is for bucket objects, and it uses IAM Policies to set which api calls should be allowed for a specific user from IAM
Resource based security are bucket wide rules that you can assign them from the s3 console. These rules can allow a specific user to have access, and it is even cross account. So it can allow users from other AWS Accounts to have access to the bucket
What is resource based security in S3?
Resource based security contains the following:
Bucket Policies: These are bucket wide rules that you can assign from the s3 console. These rules can allow a specific user to have access, and it can even be cross account. So it can allow users from other AWS Accounts to have access to the bucket.
Object ACLs: A finer grained security for bucket objects. These can be disabled.
Bucket ACLs: Less common. And can be disabled.
What is user based security in S3?
User based security is for s3 in general. It uses IAM Policies to set which api calls should be allowed for a specific user from IAM.
What are Object ACL?
A finer grained security for bucket objects.
What is a principal?
That to which a permission or role applies to. A user or a resource
A principal can access an s3 object if?
If the user IAM permissions allow it, OR, if the resource policy allows it, AND, there is no explicit deny.
Can you use encryption in s3?
Yes. You can encrypt objects using encryptions keys.
What are S3 bucket policies made of?
JSON document. Very similar to IAM Policies.
How can you force objects to be encrypted at upload in s3?
With a bucket policy.