简体   繁体   English

使用 aws s3 cp(本地)将数据从我的 S3 存储桶移动到我的 EC2 实例是否会产生数据传输费用?

[英]Will there be data transfer fees using aws s3 cp (locally) to move data from my S3 bucket to my EC2 instance?

The question is mostly self-explanatory.这个问题主要是不言自明的。 If I run aws s3 cp <s3_bucket> <ec2_host> locally (assuming both the bucket and the instance are on the same region), does the data go from s3 to ec2 internally (in which case there are no data transfer costs), or does it go first from the bucket to my computer, and only then to the instance (in which case there are s3 download data transfer costs)?如果我在本地运行aws s3 cp <s3_bucket> <ec2_host> (假设存储桶和实例都在同一个区域上),数据 go 是否在内部从 s3 到 ec2 (在这种情况下没有数据传输成本),或者go 首先从存储桶到我的计算机,然后才到实例(在这种情况下有 s3 下载数据传输成本)?

Thanks a lot.非常感谢。

AWS S3 pricing writes: AWS S3 定价写道:

Transfers between S3 buckets or from Amazon S3 to any service(s) within the same AWS Region are free .在 S3 存储桶之间或从 Amazon S3 到同一 AWS 区域内的任何服务的传输都是免费的。

Please note that if you are using NAT gateway to access S3 from private subnet you will pay for NAT transfers.请注意,如果您使用NAT 网关从私有子网访问 S3,您将支付 NAT 传输费用。 Use VPC S3 gateway endpoint instead.请改用 VPC S3 网关终端节点。 So if you are using aws s3 cp from private subnet through NAT, you will pay for them.因此,如果您通过 NAT 从私有子网使用aws s3 cp ,您将为此付费。

The documentation for the cp command states this at the beginning: cp命令的文档在开头说明了这一点:

  cp
<LocalPath> <S3Uri> or <S3Uri> <LocalPath> or <S3Uri> <S3Uri>

In other words, each of the x and y in aws s3 cp <x> <y> can be either a S3 URI or a local reference.换句话说, aws s3 cp <x> <y>中的每个xy都可以是 S3 URI 或本地引用。 There is no option there to point it at an EC2 instance.没有选项可以将其指向 EC2 实例。 If you did try to run aws s3 cp s3://bucketname/key.name 1.2.3.4 , you would just end up with a file called 1.2.3.4 on your machine.如果您确实尝试运行aws s3 cp s3://bucketname/key.name 1.2.3.4 ,您最终会在您的机器上得到一个名为1.2.3.4的文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何配置通过 VPC 从 aws ec2 实例访问我的 aws s3 存储桶 - How to configure access to my aws s3 bucket from aws ec2 instance via VPC 在 AWS S3 中处理来自 EC2 实例的数据 - Process data in AWS S3 from EC2 instance 如何使用竞价型实例数据Feed将AWS EC2竞价型实例的使用情况和价格发送到S3存储桶 - How do I send aws ec2 spot instances usage and pricing to s3 bucket using spot instance data feed 如何使用 AWS Lambda 函数将文件从 S3 存储桶复制到 EC2 Windows 实例 - How to copy a file from S3 bucket to an EC2 Windows instance using AWS Lambda function 从我的 EC2 实例下载 S3 存储桶中的文件 - download a file from S3 bucket from my EC2 instance 使用php将文件从AWS s3预算传输到ec2实例 - transfer file from AWS s3 budget to ec2 instance using php 每当我向 s3 添加新文件时,如何将文件从 s3 传输到我的 ec2 实例? - How do I transfer files from s3 to my ec2 instance whenever I add a new file to s3? 可以访问S3存储桶以流式传输视频的AWS EC2实例 - AWS EC2 instance with access to S3 bucket for streaming a video 如何将数据从Amazon S3传输到Amazon EC2 - How to transfer data from Amazon S3 to Amazon EC2 重启 EC2 实例后 AWS S3 存储桶未重新挂载 - AWS S3 bucket is not remounting after restarting EC2 Instance
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM