Reader small image

You're reading from  The Self-Taught Cloud Computing Engineer

Product typeBook
Published inSep 2023
PublisherPackt
ISBN-139781805123705
Edition1st Edition
Right arrow
Author (1)
Dr. Logan Song
Dr. Logan Song
author image
Dr. Logan Song

Dr. Logan Song is the enterprise cloud director and chief cloud architect at Dito. With 25+ years of professional experience, Dr. Song is highly skilled in enterprise information technologies, specializing in cloud computing and machine learning. He is a Google Cloud-certified professional solution architect and machine learning engineer, an AWS-certified professional solution architect and machine learning specialist, and a Microsoft-certified Azure solution architect expert. Dr. Song holds a Ph.D. in industrial engineering, an MS in computer science, and an ME in management engineering. Currently, he is also an adjunct professor at the University of Texas at Dallas, teaching cloud computing and machine learning courses.
Read more about Dr. Logan Song

Right arrow

Accessing S3 from EC2 instances

Now that we have launched an EC2 instance in Chapter 1 and created S3 buckets in Chapter 2, naturally, we will ask the question: do my EC2 instances have access to my S3 buckets?

To answer this question, we need to look at it from two perspectives:

  • S3 is a public endpoint, so the EC2 instance needs to have a public IP address.

However, that’s not enough – when you log into the EC2 instance, and run the command (as shown in the following figure):

aws s3 ls

You will find that there are no S3 buckets listed:

Figure 2.14 – No S3 bucket is found from EC2

Figure 2.14 – No S3 bucket is found from EC2

  • To have an EC2 instance access S3 buckets, we need to assign an IAM role to the EC2 instance. Recall that we briefly covered this in the EC2 section in Chapter 1:

An IAM role can be assigned with permissions to access other AWS resources, such as reading an Amazon Simple Storage Service (S3) bucket. By attaching the IAM...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
The Self-Taught Cloud Computing Engineer
Published in: Sep 2023Publisher: PacktISBN-13: 9781805123705

Author (1)

author image
Dr. Logan Song

Dr. Logan Song is the enterprise cloud director and chief cloud architect at Dito. With 25+ years of professional experience, Dr. Song is highly skilled in enterprise information technologies, specializing in cloud computing and machine learning. He is a Google Cloud-certified professional solution architect and machine learning engineer, an AWS-certified professional solution architect and machine learning specialist, and a Microsoft-certified Azure solution architect expert. Dr. Song holds a Ph.D. in industrial engineering, an MS in computer science, and an ME in management engineering. Currently, he is also an adjunct professor at the University of Texas at Dallas, teaching cloud computing and machine learning courses.
Read more about Dr. Logan Song