Lab3_S3-1

.docx

School

Northern Kentucky University *

*We aren’t endorsed by this school

Course

285

Subject

Computer Science

Date

Apr 3, 2024

Type

docx

Pages

4

Uploaded by Lukem11568

Report
CIT 438 Cloud Computing Lab#03: AWS S3 In this lab, you will study the Amazon S3. You will use the aws s3 and s3api commands to manage data in Amazon S3. Tools and Materials 1. One CentOS VM on the vSphere servers. 2. Amazon AWS security credentials 3. Aws CLI Note: You need to replace words in italics with your information. Part 1: Basic Operations with S3 Start your VM image on the vSphere server. Log in as cit438 with password cit438. Please su to root in a terminal (the password is cit438). Assume your current directory is /home/cit438. 1. List all buckets owned by the user via the ls command. aws s3 ls What is the output? No output popup up 2. Make a bucket via the following mb command: aws s3 mb s3:// your_user_name What is the output? make_bucket: Lukem1 3. List the contents of the bucket via the following ls command: aws s3 ls s3:// your_user_name What is the output? no output 1
4. Create a directory named webpages. Go to the webpages directory. Use vi or other text editor to create a simple html file called hello.html. The content of the file is as follows: <html><body><h1>Amazon S3</h1> Hello World! </body></html> Upload the file into the bucket and make the file available to the public via the following command: I was hoping to get an updated lab from Dr. Hao in Week 4 but that was not possible so I am going with the workaround from last semester. Amazon has made a change to the way S3 ACL's work. You will get "The bucket does not allow ACLs" or something similar. We are basically removing a protection that would allow anyone who knew the bucket url to access files in the bucket. This is dangerous in real world situation so keep that in mind. This has led to many incidences of personal data being found on the internet. Below are the commands to allow. aws s3api put-public-access-block --bucket <you-user-name> --public-access-block-configuration 'BlockPublicAcls=false,IgnorePublicAcls=false,BlockPublicPolicy=false,RestrictPublicBuckets=false' aws s3api put-bucket-ownership-controls --bucket <your-user-name> --ownership-controls 'Rules=[{ObjectOwnership="BucketOwnerPreferred"}] ' aws s3 cp hello.html s3:// your_user_name --acl public-read What is the output? upload: ./hello.html to s3://Lukem1/hello.html 5. Amazon S3 is object storage over the Internet. The S3 object is accessible over the Internet. Open a browser and access to http://s3.amazonaws.com/ your_user_name /hello.html. What did you see in the browser? Part 2: Static Website Hosting with S3 6. Let’s enable the bucket for static website hosting. Create two html files under the current directory. One file is named index.html. Its content is as follow: <html><body> This is an index page! </body></html> 2
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help