Creating an S3 Bucket
- Sign in to the AWS Management console. After sign in, the screen appears is shown below:
![Creating an S3 Bucket](https://static.javatpoint.com/tutorial/aws/images/aws-creating-s3-bucket.png)
- Move to the S3 services. After clicking on S3, the screen appears is shown below:
![Creating an S3 Bucket](https://static.javatpoint.com/tutorial/aws/images/aws-creating-s3-bucket2.png)
- To create an S3 bucket, click on the "Create bucket". On clicking the "Create bucket" button, the screen appears is shown below:
![Creating an S3 Bucket](https://static.javatpoint.com/tutorial/aws/images/aws-creating-s3-bucket3.png)
- Enter the bucket name which should look like DNS address, and it should be resolvable. A bucket is like a folder that stores the objects. A bucket name should be unique. A bucket name should start with the lowercase letter, must not contain any invalid characters. It should be 3 to 63 characters long.
![Creating an S3 Bucket](https://static.javatpoint.com/tutorial/aws/images/aws-creating-s3-bucket4.png)
- Click on the "Create" button. Now, the bucket is created.
![Creating an S3 Bucket](https://static.javatpoint.com/tutorial/aws/images/aws-creating-s3-bucket5.png)
We have seen from the above screen that bucket and its objects are not public as by default, all the objects are private.
- Now, click on the "javatpointbucket" to upload a file in this bucket. On clicking, the screen appears is shown below:
![Creating an S3 Bucket](https://static.javatpoint.com/tutorial/aws/images/aws-creating-s3-bucket6.png)
- Click on the "Upload" button to add the files to your bucket.
![Creating an S3 Bucket](https://static.javatpoint.com/tutorial/aws/images/aws-creating-s3-bucket7.png)
- Click on the "Add files" button.
![Creating an S3 Bucket](https://static.javatpoint.com/tutorial/aws/images/aws-creating-s3-bucket8.png)
- Add the jtp.jpg file.
![Creating an S3 Bucket](https://static.javatpoint.com/tutorial/aws/images/aws-creating-s3-bucket9.png)
- Click on the "upload" button.
![Creating an S3 Bucket](https://static.javatpoint.com/tutorial/aws/images/aws-creating-s3-bucket10.png)
From the above screen, we observe that the "jtp.jpg" has been successfully uploaded to the bucket "javatpoint".
- Move to the properties of the object "jtp.jpg" and click on the object URL to run the file appearing on the right side of the screen
![Creating an S3 Bucket](https://static.javatpoint.com/tutorial/aws/images/aws-creating-s3-bucket11.png)
- On clicking the object URL, the screen appears is shown below:
![Creating an S3 Bucket](https://static.javatpoint.com/tutorial/aws/images/aws-creating-s3-bucket12.png)
From the above screen, we observe that we are not allowed to access the objects of the bucket.
- To overcome from the above problems, we need to set the permissions of a bucket, i.e., "javatpointbucket" and unchecked all of them.
![Creating an S3 Bucket](https://static.javatpoint.com/tutorial/aws/images/aws-creating-s3-bucket13.png)
- Save these permissions.
- Enter "confirm" in a textbox, then click on the "confirm" button.
![Creating an S3 Bucket](https://static.javatpoint.com/tutorial/aws/images/aws-creating-s3-bucket14.png)
- Click on the "Actions" dropdown and then click on the "Make public".
![Creating an S3 Bucket](https://static.javatpoint.com/tutorial/aws/images/aws-creating-s3-bucket15.png)
- Now, click on the Object URL of an object to run the file.
Important points to remember
- Buckets are a universal namespace, i.e., the bucket names must be unique.
- If uploading of an object to S3 bucket is successful, we receive a HTTP 200 code.
- S3, S3-IA, S3 Reduced Redundancy Storage are the storage classes.
- Encryption is of two types, i.e., Client Side Encryption and Server Side Encryption
- Access to the buckets can be controlled by using either ACL (Access Control List) or bucket policies.
- By default buckets are private and all the objects stored in a bucket are also private.
No comments:
Post a Comment