How can i allow traffic for download files in my bucket using my own instance ec2?

0

I have a nodejs backend running in my instance ec2 and bucket with my files. I need to allow traffic for that users can do a download for this file but the instance show me in return that this connection refused for this.

  • Have you setup an S3 Gateway endpoint, assuming your ec2 is in a vpc?

  • Yes, i did have create a access point in S3 and i pointed for VPC that have connection in EC2

  • Does ec2 have an iam role that allows access to the bucket? Can you share the policy associated and any bucket policy if any?

  • So I created the role in IAM. I have connected this IAM role on the EC2 instance. As before i could make an upload and yet can, but i don't can to make a download of file

  • Is the download (GetObject) request coming from the EC2 instance or the user's browser (HTTP/S)?

Yuri
asked a year ago218 views
1 Answer
0

To connect to your S3 buckets from your EC2 instances, you must do the following:

  1. Create an AWS Identity and Access Management (IAM) profile role that grants access to Amazon S3.
  2. Attach the IAM instance profile to the instance.
  3. Validate permissions on your S3 bucket.
  4. Validate network connectivity from the EC2 instance to Amazon S3.
  5. Validate access to S3 buckets.

Reference

profile pictureAWS
EXPERT
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions