Create an S3 bucket
- Versioning:
- By default if the same object is uploaded, then s3 will try to overwrite the object.
- We can enable versioning to avoid this.
- Once the version is enable it can be suspended but not disabled.
- lets enable versioning
- Create an s3 bucket in the configure options tab select enable versioning

- Enabling and suspending versions can be done even after bucket creation

- Cross Region Replication:
- Contents of S3 bucket can be replicated from one region to other

- Enable versioning from cli
#!/bin/bash #source bucket details s3_bucket_source_name="qts3crossregionsrc" source_region="us-west-2" #target bucket details s3_bucket_target_name="qts3crossregiontg" target_region="ap-south-1" # create an s3 bucket aws s3 mb --region ${source_region} "s3://${s3_bucket_source_name}" # Lets enable versioining in source and target buckets aws s3api put-bucket-versioning --bucket ${s3_bucket_source_name} \ --versioining-configuration Status=Enabled aws s3api put-bucket-versioning --bucket ${s3_bucket_target_name} \ --versioining-configuration Status=Enabled - Contents of S3 bucket can be replicated from one region to other
Athena and S3 Select
- Athena allows you to query the data within s3 as if it is relational database.
- Athena queries are standard sql queries

- S3 Select is similar to Athena, but ita allows you select fragments out of single object in s3 Refer Here
Lifecycle
- AWS S3 buckets gives us lifecycle option to move objects from one storage class to other storage class.

- We can move the objects into glacier as well
- To move the objects only b/w frequent and infrequent tiers we can use aws s3 storage class as Intelligent Tiering.
Next Steps
- Topics
- Writing Policies
- Writing ACL’s
- Querying S3
- Ensure you go through basic json tutorial.
