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
已提問 1 年前檢視次數 249 次
1 個回答
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
專家
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南