This content originally appeared on DEV Community and was authored by DEV Community
What is AWS (Amazon Web Service)
In simple word aws is just a cloud vendor (like other cloud vendor Google GCP and Micrsoft Azure) that work on pay as you go. It provide a servers where we can host our website and it can be access remotely from anywhere and many more service are provided by the AWS like - EC2, S3, IOT, ML, VPC, Container, Robotics etc.
check out all services
What is S3 (Simple Storage Service)
Amazon Simple Storage Service (Amazon S3) is an object storage service offering industry-leading scalability, data availability, security, and performance. Customers of all sizes and industries can store and protect any amount of data for virtually any use case, such as data lakes, cloud-native applications, and mobile apps. With cost-effective storage classes and easy-to-use management features, you can optimize costs, organize data, and configure fine-tuned access controls to meet specific business, organizational, and compliance requirements.
What is Bucket
Bucket is just a kind of container where we can put objects(object means we can say files) and we can also say that it could be a folder that contain some kind of files and folders.
Prerequisite
Basic Knowledge of AWS
how storage or file system work
A smile on your face :)
In this article we will discuss two way to create S3 bucket
- Through aws s3 dashboard
- Through aws cli
Create S3 Bucket with AWS dashboard
- Go to s3 dashboard (search S3 on search box and click it)
- Click on create bucket button enter the bucket name and bucket name should be unique because bucket name would not be a duplicate. You can also select specific region in which region you want to create bucket.
By default all public access are blocked but you can unchecked if you want to make bucket public. If you unchecked all option then other user can access all the objects of this particular bucket otherwise no one can access this bucket objects.
At the end click on create button. Now you can see that one S3 bucket has added on dashboard.
Create S3 Bucket through AWS CLI
To create S3 bucket through AWS CLI you must install awscli tool.
Install AWS CLI (Linux, Mac, Windows)
For the linux user
go to the terminal and link your machine to the aws account to access all kind of service that provided by amazon aws. run bellow command on terminal.
$ aws configure
Now go to aws site and in top right side click on your Name > Security credentials > Access keys (access key ID and secret access key) then click on Create New Access Key button it will open model after that click on show access key or you can also download it.
And when you run aws configure on terminal it would ask bellow thing.
- AWS Access Key ID
- AWS Secret Access Key
- Default region name
- Default output format
To check connection is establish or not you can run bellow command.
$ aws sts get-caller-identity
{
"Account": "123456789012",
"UserId": "AR#####:#####",
"Arn": "arn:aws:sts::123456789012:assumed-role/role-name/role-session-name"
}
To check how many s3 bucket exist on you account
$ aws s3 ls
Create new fresh S3 bucket
$ aws s3 mb s3://bucket_name --region region_name
$ aws s3 mb s3://vishaljipatid --region us-east-2
you can change region name and bucket name should be unique.
After that to check that bucket is created or not.
$ aws s3 ls
And you can also check bucket from aws S3 dashboard.
For More information you can follow AWS playlist on youtube
AWS playlist
This content originally appeared on DEV Community and was authored by DEV Community
DEV Community | Sciencx (2022-02-27T04:18:53+00:00) Create S3 bucket in AWS. Retrieved from https://www.scien.cx/2022/02/27/create-s3-bucket-in-aws/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.