Getting started with Amazon S3 || Create your first S3 bucket

Getting started with Amazon S3 || Create your first S3 bucket

Create your first S3 bucket




Previous article Amazon S3 part3: Understand the potential of Amazon S3 and learn how to access it effectively.

you can get started with Amazon S3 by working with buckets and objects. A bucket is a container for objects. An object is a file and any metadata that describes that file.

In order to store an object in Amazon S3, you start by creating a bucket and subsequently uploading the object to that bucket. Once the object resides within the bucket, you have the ability to access, download, and relocate it. If you no longer require an object or a bucket, you have the option to tidy up your resources.

Amazon S3 operates on a pay-as-you-go model, meaning you are billed solely for the usage of the service. For more information about Amazon S3 features and pricing, see Amazon S3. If you are a new Amazon S3 customer, you can get started with Amazon S3 for free. For more information, see AWS Free Tier.

Prerequisite: Setting up Amazon S3

When you sign up for AWS, your AWS account is automatically signed up for all services in AWS, including Amazon S3. You are charged only for the services that you use.

To set up Amazon S3, use the steps in the following sections:

Sign up for an AWS account:

If you do not have an AWS account, create one otherwise you can skip this part 

To sign up for an AWS account

1. Open https://portal.aws.amazon.com/billing/signup.

2. Follow the online instructions.

Part of the sign-up procedure involves receiving a phone call and entering a verification code on the phone keypad.

When you sign up for an AWS account, an AWS account root user is created. The root user has access to all AWS services and resources in the account. As a security best practice, assign administrative access to an administrative user, and use only the root user to perform tasks that require root user access. if you don't know about IAM then don't worry about it. I will cover it in IAM article, till now you can perform all the tasks with root user else you can learn from documentation.

Create your first S3 bucket.

Once you have registered for AWS, you can proceed to establish an Amazon S3 bucket through the AWS Management Console. Each item within Amazon S3 is stored within a bucket, so it is essential to create a bucket prior to storing any data in Amazon S3.

Note

You are not charged for creating a bucket. You are charged only for storing objects in the bucket and for transferring objects in and out of the bucket. 

1. Sign in to the AWS Management Console and open the Amazon S3 console at https://console.aws.amazon.com/s3/.

2. In the left navigation pane, choose Buckets.

3. Choose Create bucket.

The Create bucket page opens.

4. For Bucket name, enter a name for your bucket.

The bucket name must:

• Be unique within a partition. A partition is a grouping of Regions. AWS currently has three partitions: aws (Standard Regions), aws-cn (China Regions), and aws-us-gov (AWS GovCloud (US) Regions).

• Be between 3 and 63 characters long.

• Consist only of lowercase letters, numbers, dots (.), and hyphens (-). For best compatibility, we recommend that you avoid using dots (.) in bucket names, except for buckets that are used only for static website hosting.

• Begin and end with a letter or number. After you create the bucket, you cannot change its name

👋Important 👋Avoid including sensitive information, such as account numbers, in the bucket name. The bucket name is visible in the URLs that point to the objects in the bucket.

5. For Region, choose the AWS Region where you want the bucket to reside. To reduce both latency and expenses while adhering to regulatory obligations, opt for a Region that is in proximity to your location. Unless explicitly transferred to another Region, items stored within a Region remain confined to that specific Region.

6. Under Object Ownership, to disable or enable ACLs and control ownership of objects uploaded in your bucket, choose one of the following settings:

ACLs Disabled

Bucket owner enforced (default) – ACLs are disabledt ACLs are disabled, granting the bucket owner complete ownership and control over all objects within the bucket. ACLs no longer determine access permissions for data within the S3 bucket. Instead, access control is solely defined through policies.

Unless there are exceptional circumstances requiring individual object access control, it is advisable to keep ACLs disabled, as the majority of contemporary Amazon S3 use cases no longer necessitate their usage.

ACLs enabled

Bucket owner preferred – The bucket owner owns and has full control over new objects that other accounts write to the bucket with the bucket-owner-full-control canned ACL.If you apply the Bucket owner preferred setting, to require all Amazon S3 uploads to include the

bucket-owner-full-control canned ACL, you can add a bucket policy that allows only object uploads that use this ACL.

Object writer – The AWS account that uploads an object owns the object, has full control over it, and can grant other users access to it through ACLs.

7. Under Block Public Access settings for this bucket, choose the Block Public Access settings that you want to apply to the bucket.

The default configuration enables all four Block Public Access settings. It is advisable to maintain the enabled state for all settings, unless you have a specific use case that requires you to disable one or more of them.

Note

To enable all Block Public Access settings, only the s3:CreateBucket permission is required. To turn off any Block Public Access settings, you must have the s3:PutBucketPublicAccessBlock permission.

8. (Optional) Under Bucket Versioning, you can choose if you wish to keep variants of objects in your bucket. For more information about versioning,

To disable or enable versioning on your bucket, choose either Disable or Enable.

9. (Optional) Under Tags, you can choose to add tags to your bucket. Tags are key-value pairs used to categorize storage. 

To add a bucket tag, enter a Key and optionally a Value and choose Add Tag.

10. Under Default encryption, choose Edit.

11. To configure default encryption, under Encryption type, choose one of the following

12. For now you can skip AWS Key Management Service key (SSE-KMS),

13. (Optional) If you want to enable S3 Object Lock

14. Choose Create bucket

Congratulations ! You've created a bucket in Amazon S3

To add an object to your bucket, read next article Amazon S3 part5 - Upload an object to your bucket. (Coming soon).

Post a Comment

0 Comments