AWS

AWS Copy Files Manually From S3 to EC2

Oftentimes, we would want to manually copy files from an S3 to an EC2 instance in AWS. This is possible but requires several steps and some configuration.

1. Create IAM Role For EC2 Instances

First, create a new role. This role has read-only access to S3 buckets. We will assign this role to our EC2 instances later.

How to AWS copy files from S3 to EC2

On the Identity and Access Management (IAM) page, go to Roles.

Then, click the Create Role button.

How to AWS copy files from S3 to EC2

Affix the AmazonS3ReadOnlyAccess permission policy to our new role.

We can create tags for our new role. However, we will skip that for this post.

Then, provide an appropriate name for the new role. For this post, we use S3-EC2-readonly.

How to AWS copy files from S3 to EC2

Once we successfully created the role, it will be available in the list of roles.

How to AWS copy files from S3 to EC2

2. Create an S3 Bucket

Next, we need to create an S3 bucket and configure it.

Upload a file to the S3 bucket.

3. Create EC2 Instance

Create an EC2 instance and assign it the S3-EC2-readonly IAM role.

4. Copy Files Manually From S3 To EC2 Using SSH

Copy files manually from S3 to EC2 using SSH.

How to AWS copy files from S3 to EC2

Create a directory and CD into it. Perform manual copy using:

How to AWS copy files from S3 to EC2

And that is how we copy files manually from S3 to EC2 in AWS!

Loading

Got comments or suggestions? We disabled the comments on this site to fight off spammers, but you can still contact us via our Facebook page!.


You Might Also Like