Creating and Managing S3 using AWS CLI
- Install the aws cli
- Refer Here for Windows
- Refer Here for Linux
- Refer Here
- AWS CLI:
- AWS CLI will be in the following pattern
aws <service> <action> <arguments> - Now lets create a s3 bucket and upload contents to it
Creating S3 bucket and managing it from cli
- Create s3 bucket from cli
- Tip: Navigate to the google and search for aws s3 cli
- S3 URI is writing bucket in the form of s3://<bucketname>
- To Create a bucket Refer Here for mb
- Now lets copy some content from our local system in s3 bucket
- Lets upload an image to a new folder in s3 bucket
- When you are copying and syncing
- source: s3 bucket or local folder
- destination: s3 bucket or local folder
- Tip: Navigate to the google and search for aws s3 cli
- Exercise-1: Create a s3 bucket from cli and add three folders as mentioned below and upload two objects (files) into each folder
- music
- videos
- docs
- Exercise-2: Create an S3 bucket from cli and sync it with some contents from your laptop. Now create one linux ec2 instance and sync the contents from s3 bucket into server
- Exercise-3: Delete all the buckets creates (rb)
- Exercise-4: list all bucket (aws s3 ls) and list the contents of specific bucket (aws s3 ls <s3uri>) and list the contents of some folder (aws s3 ls <s3-uri>/folder )
- Give public read access while uploading/sync
