1. Firstly we have to download a aws cli, link is given below:- https://aws.amazon.com/cli/
2. Now we create a user in IAM and provide a full access of s3 bucket and also create a access key
3. Now we have to open a terminal in our system and follow the commands to creat a s3 bucket through cli which is written below:-
First we want to configure the aws- $ aws configure
a)AWS Access Key ID [None]: accesskey ID
b)AWS Secret Access Key [None]: Secret access key
c)Default region name [None]: region name
d)Default output format [None]: json
4. For create the bucket- $ aws s3 mb s3://bucketname --region us-east-1
5. For delete the bucket- $ aws s3 rb s3://bucketname --force
6. For check how many bucket are created- $ aws s3 ls
7. For uplod the data-first we have to open a folder through comands:-
a)$ cd Desktop
b)$ cd folder name (that folder name which we wate to uplode in s3 bucket)
c)$ aws s3 sync . s3://bucket name(now the data is uploded in s3 bucket)
6.If data was deleted from our pc then how to download the from s3 bucket which we stored:-
a)$ aws s3 cp s3://mybucket/test.txt test2.txt .
8. For check what we had to stored in the bucket- $ aws s3 ls s3://bucket name --recursive --human-readable --summarize
9. For removing the data which we had stored in the bucket- $ aws s3 rm s3://bucket name --recursive
10.Forcefully remove the bucket without delete the data which we had stored- $ aws s3 rb s3://bucket name --force
a)$ cd Desktop
b)$ cd folder name (that folder name which we wate to uplode in s3 bucket)
c)$ aws s3 sync . s3://bucket name(now the data is uploded in s3 bucket)
6.If data was deleted from our pc then how to download the from s3 bucket which we stored:-
a)$ aws s3 cp s3://mybucket/test.txt test2.txt .