Costs related to AWS Lambda and S3 codes

1

When an AWS Lambda function has codes that are saved in a bucket in S3, does the access to the sources for each function initiated respect the S3 cost policy?

An example would be, each function that starts the same low the S3 code and I paid the transfer rate and access fee as if it were myself accessing and downloading the file?

Thank you.

    
asked by anonymous 10.04.2018 / 18:38

1 answer

1

The question is a bit confusing and the part of "every function that starts the same lowers the code of S3" generates different interpretations, but we go to the points:

Function Code

If you are referring to Function Code vs Invoke (start of container execution), I do not believe it will "download" your code every time you run it.

First, the container can be reused for an indeterminate period of time, so if the container is "hot" the execution may (or may not) consider the code that has previously run.

Second, the cold start of the container takes a considerable time now, imagine if the package (zip, jar and etc) has 50MB and the container has to download the code with each execution, the latency of that would be a bit bizarre and its cost in S3 would also rise.

Although I do not find the official documentation of how this part of the core works, it does not make much sense to believe that your code is downloaded every time.

Note: Take a test, deploy version 1 of Lambda Function and then go to S3 (update only on S3) and update the package to version 2 (some different print and etc). See if during all runs version 2 was used.

Resource Consumption in S3

If you are referring to the access your code makes to features in S3 (example: your code uploads or downloads images), then the S3 cost policy is applied normally.

If you find something different post here, I've always found the AWS documentation a bit obscure.

    
13.04.2018 / 18:42