AWS Classroom Series – 02/Sept/2020

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 Preview Preview
    • Enabling and suspending versions can be done even after bucket creation Preview
  • Cross Region Replication:
    • Contents of S3 bucket can be replicated from one region to other Preview Preview Preview Preview Preview Preview
    • 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
    

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 Preview Preview Preview
  • 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. Preview Preview Preview Preview Preview Preview
  • 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
    1. Writing Policies
    2. Writing ACL’s
    3. Querying S3
  • Ensure you go through basic json tutorial.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Animated Social Media Icons by Acurax Wordpress Development Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube