4

AWS Lambda Supports up to 10 GB Ephemeral Storage for Data-Intensive Application...

 2 years ago
source link: https://www.infoq.com/news/2022/03/aws-lambda-ephemeral-storage/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

AWS Lambda Supports up to 10 GB Ephemeral Storage for Data-Intensive Applications

Mar 31, 2022 2 min read

AWS recently announced that Lambda functions now support up to 10 GB of ephemeral storage that is preserved for the lifetime of the execution environment. The feature will help customers that run data workloads such as media processing, machine learning inference or financial analysis.

Channy Yun, principal developer advocate at AWS, explains the previous challenge:

Data-intensive applications require large amounts of temporary data specific to the invocation or cached data that can be reused for all invocation in the same execution environment in a highly performant manner (...) Since customers could not cache larger data locally in the Lambda execution environment, every function invoke had to read data in parallel, which made scaling out harder for customers.

The Lambda execution environment provides an ephemeral /tmp file system that can be used as a transient cache for data between invocations. By default, the platform allocates 512 MB for a function’s temporary directory but the value can be increased using the console, the CLI, or a SDK up to 10 GB. Simon Crosby, CTO at Swim, is not convinced about the advantages:

Just use stateful web services and ditch the slow round-trip time to storage! AKA "memory is your ephemeral store".

12022-aws-lambda-ephemeral-storage-1-new-1648400867977.png

Source: https://aws.amazon.com/blogs/aws/aws-lambda-now-supports-up-to-10-gb-ephemeral-storage/

As covered by James Beswick, Principal Developer Advocate at AWS, Lambda supports other three data storage options: S3, Lambda layers and the elastic file system EFS. Bryson Tyrrell, technical lead at Jamf software, asked:

What are the use cases for 10 GB in a Lambda Function? Is this targeted to the AI/ML crowd?

Tyrrell received many suggestions, from video transcoding to AI/ML workloads, from lift and shift of existing applications to increasing AWS revenue. Randall Hunt, VP of cloud strategy and solutions at Caylent, compares the cost of running serverless functions and containers on AWS:

AWS Lambdas are now configurable up to: 10GB deployment size, 10GB RAM (6vCPU), 10GB /tmp and 15 minute runtime. So your most expensive per-invocation lambda cost ends up: ~$0.13. On Fargate, nonspot, (4vCPU) that same task: ~$0.07. Worth it? Totally depends on the workload.

Luc van Donkersgoed, lead engineer at PostNL, focuses instead on the cost of the ephemeral storage:

Did some calculations on ephemeral storage pricing, and I must say: it's very, very reasonable. In an extreme case (512MB mem, 10GB storage) the storage is 3,73% of the execution cost. When mem and storage are configured as equal values, storage is only 0,19% of the cost.

Developers can configure the size of the ephemeral storage in all AWS regions where AWS Lambda is available and are charged for the storage above the 512 MB free limit for the duration of the function invocation.

About the Author

Renato Losio

Renato has many years of experience as a software engineer, tech lead and cloud services specialist in Italy, UK, Portugal and Germany. He lives in Berlin and works remotely as principal cloud architect for Funambol. Cloud services and relational databases are his main working interests. He is a AWS Data Hero.

Show more

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK