AWS CSAA S3

On this page, you’ll find the demo related to the AWS S3 service. You can, for example, see how a s3 bucket is created through command line, how to easily host a static website or configure versioning.

AWS CLI

Create a bucket

In this demo, we will create a bucket and upload a simple file to it using az-cli

  1. Create the bucket
    aws s3 mb s3://{MyUniqueBucketName}
    
  2. View the bucket
    aws s3 ls
    
  3. Upload a file
    aws s3 cp {myfile} s3://{MyUniqueBucketName}
    
  4. View your bucket’s content
    aws s3 ls s3://{MyUniqueBucketName}
    
  5. Download a file
    aws s3 cp s3://{MyUniqueBucketName}/{myfile}
    

AWS Console

Static website

  1. Create a Bucket
  2. Upload your static website
  3. Enable Static Website Hosting
    1. Go to properties
    2. Open Static website hosting
      1. Chose use this bucket to host a website
      2. Enter the name of the index page (e.g. index.html)
      3. If required, enter the name of the error page (e.g. error.html)
      4. Save
    3. In the same panel, you can see the Endpoint of your website
  4. Open the endpoint: You receive an error. It is expected as the files are not publicly visible by default
    1. Go back to the list of files in your bucket
    2. Select all the files related to your web site
    3. In Actions, select Make Public
    4. Open your endpoint again, your website should appear!

If you are interested, you can read more on the subject in AWS documentation


Create versioning

  1. Create a Bucket
  2. Enable Versioning.
    1. Go to properties,
    2. Open Versioning property,
    3. Click on enable versioning and save,
  3. Upload an object and validate it is availables.
  4. Modify the object and view the multiple version.
  5. Soft-Delete the object and view the delete flag on latest version.
  6. Delete all version of the object to delete it.

If you are interested, you can read more on the subject in AWS documentation

Comments