1. Creating an Amazon S3 Bucket
Amazon S3 (Simple Storage Service) allows you to create buckets to store objects (files). When creating a bucket, you must:
- Choose a Region: The bucket region is important for latency and compliance. In this example, the region selected is Europe, Stockholm (eu-north-1).
- Bucket Name: Bucket names must be globally unique across all AWS accounts. If a name is already taken, an error will occur.
- Example:
stephane-demo-s3-v5
- Bucket Type: Some regions may offer "General Purpose" and "Directory" buckets.
- If "General Purpose" is available, choose it.
- If you don't see this option, it is automatically set.
2. Configuring Bucket Settings
When setting up the bucket, the following settings are configured:
a. Object Ownership
- ACLs Disabled (Recommended): This enforces security by keeping access within the AWS account.
b. Public Access Block
- Block Public Access (Enabled by Default): Ensures that objects are private and not publicly accessible.
c. Versioning
- Disabled Initially: Versioning allows keeping multiple versions of an object. It can be enabled later.
d. Encryption
- Server-Side Encryption with Amazon S3 Managed Key (SSE-S3): Ensures data security by encrypting objects before storing them.
e. Bucket Key
- Enabled: This helps reduce encryption costs by using a single key for multiple objects.
Once these configurations are set, the bucket is created and appears in the S3 console.
3. Uploading Objects to S3