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)?

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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ