简体   繁体   English

S3 定价与 aws Lambda

[英]S3 pricing with aws Lambda

Do I get charged for transfer from S3 to aws Lambda?从 S3 传输到 aws Lambda 是否需要付费?

For example a user uploads a file client side to my S3 bucket.例如,用户将文件客户端上传到我的 S3 存储桶。 My aws lambda retrieves the file to generate thumbnails.我的 aws lambda 检索文件以生成缩略图。 Does that count as S3 out to internet or S3 to cloudfront or something else?这算作 S3 到 Internet 还是 S3 到云端或其他什么?

Lambda and S3 are in the same region. Lambda 和 S3 在同一区域。

No. There is no Data Transfer charge between an AWS Lambda function and Amazon S3 in the same region.不会。同一区域的 AWS Lambda function 和 Amazon S3 之间不收取数据传输费用

From AWS Lambda – Pricing :来自AWS Lambda – 定价

Data transferred between Amazon S3... and AWS Lambda functions in the same AWS Region is free.在同一 AWS 区域中的 Amazon S3... 和 AWS Lambda 函数之间传输的数据是免费的。

However, if your Lambda function is configured to use a VPC , there will be a small (1c/GB) charge for traffic exiting the VPC.但是,如果您的 Lambda function配置为使用 VPC ,则退出 VPC 的流量将收取少量 (1c/GB) 费用。 This traffic would be routed through a NAT Gateway, which has a public IP address.此流量将通过具有公共 IP 地址的 NAT 网关进行路由。

From EC2 Instance Pricing – Amazon Web Services (AWS) :来自EC2 实例定价 – Amazon Web 服务 (AWS)

IPv4: Data transferred “in” to and “out” from public or Elastic IPv4 address is charged at $0.01/GB in each direction. IPv4:从公共或弹性 IPv4 地址“传入”和“传出”的数据在每个方向按 0.01 美元/GB 收费。

This charge does NOT apply if the Lambda function connects to the Internet directly (by NOT connecting to a VPC).如果 Lambda function 直接连接到 Internet(通过不连接到 VPC),则不收取此费用。

If Lambda reads/writes data from S3 you will be billed for requests and data stored.如果 Lambda 从 S3 读取/写入数据,您将为请求和存储的数据付费。

for example: PUT, COPY, POST, LIST requests (per 1,000 requests) - $0.005例如:PUT、COPY、POST、LIST 请求(每 1,000 个请求)- 0.005 美元

GET, SELECT, and all other requests (per 1,000 requests) - $0.0004 GET、SELECT 和所有其他请求(每 1,000 个请求) - 0.0004 美元

Prices in different regions change slightly.不同地区的价格略有变化。

To access the s3 object using lambda you will be leveraging some API ie boto3 or JAVA SDK or aws cli. To access the s3 object using lambda you will be leveraging some API ie boto3 or JAVA SDK or aws cli. So when you run get_object or download_file you will be charged for the amount of data you scanned and the amount of data returned.因此,当您运行 get_object 或 download_file 时,您需要为扫描的数据量和返回的数据量付费。 ALthough the amount is so minimal that it doesn't impact billing that much but still you are charged.虽然金额很小,不会对计费产生太大影响,但您仍然需要付费。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM