[フレーム]
BT

InfoQ Software Architects' Newsletter

A monthly overview of things you need to know as an architect or aspiring architect.

View an example

We protect your privacy.

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Unlock the full InfoQ experience

Unlock the full InfoQ experience by logging in! Stay updated with your favorite authors and topics, engage with content, and download exclusive resources.

Log In
or

Don't have an InfoQ account?

Register
  • Stay updated on topics and peers that matter to youReceive instant alerts on the latest insights and trends.
  • Quickly access free resources for continuous learningMinibooks, videos with transcripts, and training materials.
  • Save articles and read at anytimeBookmark articles to read whenever youre ready.

Topics

Choose your language

InfoQ Homepage News AWS Launches Lambda SnapStart for Python and .NET Functions

AWS Launches Lambda SnapStart for Python and .NET Functions

This item in japanese

Dec 03, 2024 2 min read

Write for InfoQ

Feed your curiosity. Help 550k+ global
senior developers
each month stay ahead.
Get in touch
Listen to this article - 0:00
Audio ready to play
0:00
0:00

AWS has introduced the general availability of Lambda SnapStart for Python and .NET functions, a feature designed to improve the startup performance of serverless applications significantly.

Earlier, the company introduced Lambda SnapStart for Java functions to reduce cold starts. With the SnapStart for Python and .NET functions, this is now also applied for functions written in Python, C#, F#, and Powershell.

Lambda SnapStart optimizes function cold-start latency by initializing environments ahead of time and caching their memory and disk states. This cached environment is then used to resume execution, minimizing delays often caused by cold starts. Channy Yun, a principal developer advocate for AWS cloud, writes:

When you invoke the function version for the first time, and as the invocations scale up, Lambda resumes new execution environments from the cached snapshot instead of initializing them from scratch, improving startup latency.

(Source: AWS News Blog Post)

Marc Brooker, VP/Distinguished Engineer at Amazon Web Services, explains in a LinkedIn blog post:

Each Lambda function runs in one or more Firecracker-based MicroVMs, and each MicroVM has some associated state: memory, device state, CPU registers, and the like. A "snapshot" is when we tell Firecracker to store this state - writing down the memory and other state to a file on disk. This snapshot can be restored on the same physical machine, or a different machine with the same hardware configuration. Restoring is a simple matter of copying that state back into memory, back into the devices, and back into the CPU, then telling the (virtual) CPU that it can go ahead and start running.

Developers can use the AWS Management Console, AWS Command Line Interface (AWS CLI), or AWS SDKs to activate, update, and delete SnapStart for Python and .NET functions. They can activate Lambda functions using Python 3.12 and higher and .NET 8 and higher managed runtimes.

Yan Cui, an AWS Serverless Hero, tweeted:

Wow, SnapStart is now available for Python and .Net functions.

Interesting they didn't do it for Node, I guess it's not about popularity, so must be something about Node that doesn't work well with SnapStart.

Currently, AWS Lambda SnapStart for Python and .NET functions are available in US East (N. Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Singapore), Asia Pacific (Sydney), Asia Pacific (Tokyo), Europe (Frankfurt), Europe (Ireland), and Europe (Stockholm) AWS regions.

Lastly, with Python and .NET managed runtimes, SnapStart charges include the caching cost per published function version and restoration costs for each instance. The company recommends deleting unused function versions to lower SnapStart cache costs. Lambda's pricing details are available on the pricing page.

About the Author

Steef-Jan Wiggers

Show moreShow less

Rate this Article

Adoption
Style

Related Content

The InfoQ Newsletter

A round-up of last week’s content on InfoQ sent out every Tuesday. Join a community of over 250,000 senior developers. View an example

We protect your privacy.

BT

AltStyle によって変換されたページ (->オリジナル) /