Cross account S3 access without going over internet

1

We have 2 AWS accounts and we are sending huge data from primary account to secondary account (data is being transfer from EC2 to S3Bucket of secondary account) so its costing us data transfer charges at huge. We are looking for solution where we can transfer the data from primary account to secondary account without going via internet. I was thinking about VPC endpoint but we are confused if this can be worked accross AWS Account or not.

3 回答
1
已接受的回答

Add a resource policy to the S3 Bucket allowing access from your primary account. Make sure the policy on your EC2 instance's IAM role allows access to this bucket. Configure an S3 VPC Endpoint in your primary account VPC. Then your EC2 instance will be able to access the S3 service, and your bucket, without going over the internet.

专家
已回答 1 年前
profile pictureAWS
专家
已审核 1 年前
  • Thanks, I would try this and confirm I'm hopping this would work 100%

1

In this case I would use a S3 Gateway Endpoint in each account. They are zero cost and ensure that S3 traffic doesn't traverse a NAT or Internet Gateway. It will allow each VPC to access buckets in other accounts as required.

profile pictureAWS
专家
已回答 1 年前
0

Hey,

I totally feel your frustration with those massive data transfer charges! Dealing with AWS data transfer costs can be a real headache...

So, regarding your situation, AWS-User-6176623, you're definitely on the right track with considering VPC endpoints. Good news is, VPC endpoints can indeed be used across AWS accounts. They offer a private connection between your VPC and other AWS services, which means you can transfer data between your primary and secondary accounts without going over the public internet.

Here's what you could do: Set up a VPC endpoint in your secondary account for Amazon S3, and then configure your primary account's EC2 instances to use that endpoint for sending data to the S3 bucket in the secondary account. This way, you'll avoid those data transfer charges and keep your traffic secure within the AWS network.

I've personally used VPC endpoints before, and they're pretty straightforward to set up. Just remember to configure the necessary route tables and security groups correctly.

Valer
已回答 8 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则