Lab 1 - Amazon Simple Storage (S3)
Lab 1 - Amazon Simple Storage (S3)
Qwiklabs
Qwiklabs
16-20 minutes
© 2021 Amazon Web Services, Inc. and its affiliates. All rights reserved. This work may
not be reproduced or redistributed, in whole or in part, without prior written permission
from Amazon Web Services, Inc. Commercial copying, lending, or selling is prohibited.
All trademarks are the property of their owners.
Corrections, feedback, or other questions? Contact us at AWS Training and Certification.
Overview
This lab introduces you to Amazon Simple Storage Service (Amazon S3) by using the
AWS Management Console.
Amazon Simple Storage Service (Amazon S3) is storage for the internet. You can use
Amazon S3 to store and retrieve any amount of data at any time, from anywhere on the
web.
Topics Covered
After completing this lab, you can:
Create a bucket in Amazon S3
Add an object to your bucket
Manage access permissions on an object
Create a bucket policy
Use bucket versioning
Host a static website
Start Lab
1. At the top of your screen, launch your lab by choosing Start Lab
This starts the process of provisioning your lab resources. An estimated amount of time to
provision your lab resources is displayed. You must wait for your resources to be
provisioned before continuing.
If you are prompted for a token, use the one distributed to you (or credits you have
purchased).
2. Open your lab by choosing Open Console
This opens an AWS Management Console sign-in page.
3. On the sign-in page, configure:
IAM user name:
Password: Paste the value of Password from the left side of the lab page
Choose Sign In
Do not change the Region unless instructed.
Common Login Errors
Error: You must first log out
If you see the message, You must first log out before logging into a different AWS
account:
Choose click here
Close your browser tab to return to your initial lab window
Choose Open Console again
You should now see a picture of the Eiffel Tower. This is because the bucket policy applies
to the bucket as a whole, without having to grant individual permissions to each object
individually.
60. Keep this browser tab open, but return to the web browser tab with the S3
Management Console.
Task 5: Explore Versioning
Versioning is a means of keeping multiple variants of an object in the same bucket. You
can use versioning to preserve, retrieve, and restore every version of every object that is
stored in your Amazon S3 bucket. With versioning, you can easily recover from both
unintended user actions and application failures.
In this task, you will upload a different version of the Eiffel Tower picture.
61. Right-click this link and save the picture to your computer using the same name:
Eiffel.jpg
Though this file has the same name as the previous file, it is a different picture. Save it to a
different location or override the existing Eiffel.jpg so that you can notice the version
change once you upload.
62. In the S3 Management Console, choose the Objects tab.
63. Choose Upload and use the same upload process to upload the new Eiffel.jpg
picture.
This is the same upload process you used in Task 2 (Upload an Object to the Bucket).
64. Go to the browser tab that has the picture of the Eiffel tower.
65. Take note of the contents of the picture, then refresh the page.
You should now see a different picture. Amazon S3 always returns the latest version of an
object, if a version is not otherwise specified.
You can also obtain a list of available versions in the S3 Management Console.
66. Close the web browser tab that is displaying the Eiffel Tower.
67. In the S3 Management Console, Choose the name of the Eiffel.jpg object.
68. Choose the Versions tab.
69. Select the bottom version (which is not the latest version):
70. Choose Actions > Open.
You should now see the first version of the picture by using the S3 Management Console.
However, if you try to access the older Eiffel Tower picture by using the Amazon S3 URL
link, you will receive an Access denied message. This is expected in the lab because you
only have permission to access the latest version of the object. In order to access the
previous version of the object, you need to update your bucket policy to have the
"s3:GetObjectVersion" permission. Here is an example bucket policy that allows you to
access the older version using the link:
Task 6: Host a Static Website
In this task, you will learn how to host a static website on Amazon S3. On a static website,
individual webpages include static content. They might also contain client-side scripts.
To host a static website, you configure an Amazon S3 bucket for website hosting, and then
upload your website content to the bucket. This bucket must have public read access. It is
intentional that everyone in the world will have read access to this bucket.
71. Right-click this link, and save the file to your computer by using the same name:
index.html
72. In the S3 Management Console, Choose your bucket that starts with the name
mybucket.
73. Choose Upload and use the same upload process to upload the index.html file that
you just downloaded.
This is the same upload process you used in Task 2 (Upload an Object to the Bucket).
74. Choose Exit
75. Choose the Properties tab.
76. Scroll down to the Static website hosting section, then choose Edit
77. For Static website hosting, choose Enable.
78. For Index document, type
79. For Error document, type
80. Click Save changes
81. Scroll down to the Static website hosting section.
This should look similar to http://mybucket-sp-123.s3-website-us-west-2.amazonaws.com
82. You should see the static webpage that you just created, which should be similar to
the image below.
Lab Complete
Congratulations! You now have successfully learned how to:
Create a bucket in Amazon S3
Add an object to your bucket
Manage access permissions on an object
Create a bucket policy
Use bucket versioning
Host a static website
End Lab
Follow these steps to close the console, end your lab, and evaluate the experience.
83. Return to the AWS Management Console.
84. On the navigation bar, choose awsstudent@<AccountNumber>, and then choose
Sign Out.
85. Choose End Lab
86. Choose OK
87. (Optional):
Select the applicable number of stars
Type a comment
Choose Submit
o 1 star = Very dissatisfied
o 2 stars = Dissatisfied
o 3 stars = Neutral
o 4 stars = Satisfied
o 5 stars = Very satisfied
You may close the window if you don't want to provide feedback.
Additional Resources
Amazon S3
Editing Object Permissions
For more information about AWS Training and Certification, see
http://aws.amazon.com/training/.
Your feedback is welcome and appreciated.
If you would like to share any feedback, suggestions, or corrections, please provide the
details in our AWS Training and Certification Contact Form.