Subscribe to Our Weekly Newsletter
Creating an S3 Bucket
Creating an S3 Bucket
The following steps will instruct you on how to create an Amazon S3 Bucket:
2) On the Amazon S3 console, click the “Create Bucket” button.
The following “Create a Bucket — Select a Bucket Name and Region” dialog box appears:
3) Now you are required to enter a bucket name in the “Bucket Name field”. The bucket name chosen must be unique (not resembling any existing bucket names in Amazon S3). A good way to choose a unique name is by prefixing your bucket names with your company’s name, or some other personal detail. For the following example, we will use “webapplication”. However you should obviously choose some unique name.
Bucket names have to comply with the following specifications:
- They can contain lowercase letters, numbers, underscores (_), and dashes (-)
- They must always start with a number or letter
- They must always be between 3 and 255 characters long
- They should never be formatted as an IP address (e.g., 126.96.36.199). Periods (.) are not allowed.
There can be additional restrictions on the naming of buckets, based on the region that contains your bucket, or how you intend to access an object.
Note: Once the bucket is created, it is not possible to change its name. Additionally, a bucket name is visible in the URL pointing to the various objects stored in the bucket. Therefore, you should ensure that the bucket name chosen is appropriate.
4) Now you need to select a region in the drop-down box. By default, buckets are created in the US Standard region. However, you should choose a region that allows you to optimize latency, minimize costs and address all regulatory requirements. Objects stored in a region never leave that region unless you manually and explicitly transfer them to a different region. Now, click on “Set Up Logging”. This way, log files get created and are stored in your Amazon S3 bucket.
5) Now , the “Create a Bucket — Setup Logging” dialog box appears as such:
6) Now, check the “Enabled” box;
- Select “webappapplication” from the “Target Bucket” drop-down menu.
- Type “webapp-logging” in the “Target Prefix” box.
7) Finally, click the “Create” button.
Once Amazon S3 has successfully created your bucket, the Amazon S3 console displays the empty bucket in the “Buckets” panel:
Normally, after this final step is taken, you would upload content to your bucket and set permissions. However, we will wait until we learn how to deploy our web application, and then continue to do this step.