AWS S3 contd
- Replication to other regions
- Mangement -> Replication rules
- Replication rules will create s3 jobs
- Mangement -> Replication rules
Using CLI
-
AWS S3 supports two cli commands
- s3
- s3api (low level operations)
-
AWS CLI has the following syntax
aws <service> <action> [--arg1 value1 --argn valuen]
- Lets work with cloud shell today
- s3 bucket uri:
s3://<bucket-name>
- s3 object uri:
s3://<bucket-name>/folder-name/object-name
s3://qttesting/videos/one.mp4
ors3://qttesting/one.mp4
- Open aws s3 cli docs Refer Here
- ls:
- mb: create the bucket
- create a s3 bucket
- in this bucket create two folders
- music
- videos
- in the music upload some files
- in the videos upload some files
- show the contents
- of all the buckets
- of music folder
- of all the buckets
- Remove the bucket
- create a s3 bucket
- To upload a file
aws s3 cp
- Create a bucket with name which has source in it and one more bucket with name which has destination in it.
- Uplod some files in to source bucket (ensure you have folders) and copy the contents into destination bucket
- copy one file
- copy all the bucket
- use sync
- use recursive copy
- mv the object in a bucket from one folder to other
- Delete all the buckets
- Upload a file into a bucket with public read permissions