AWS Notes
5.59K subscribers
452 photos
42 videos
10 files
2.81K links
AWS Notes β€” Amazon Web Services Educational and Information Channel

Chat: https://xn--r1a.website/aws_notes_chat

Contacts: @apple_rom, https://www.linkedin.com/in/roman-siewko/
Download Telegram
πŸ†• Lambda + Node.js 18.x: πŸŽ‰

https://aws.amazon.com/blogs/compute/node-js-18-x-runtime-now-available-in-aws-lambda/

πŸ”Ή Node.js 18 is now supported by Lambda. When building your Lambda functions using the zip archive packaging style, use a runtime parameter value of nodejs18.x to get started building with Node.js 18.
πŸ”Έ For existing Node.js functions, review your code for compatibility with Node.js 18, including deprecations, then migrate to the new runtime by changing the function’s runtime configuration to nodejs18.x.

#Lambda
πŸŽ‰6❀‍πŸ”₯3
πŸ†• Lambda SnapStart:

https://aws.amazon.com/blogs/aws/new-accelerate-your-lambda-functions-with-lambda-snapstart/

✻ Lambda SnapStart can improve startup performance for latency-sensitive applications by up to 10x at no extra cost, typically with no changes to your function code. The largest contributor to startup latency (often referred to as cold start time) is the time that Lambda spends initializing the function, which includes loading the function's code, starting the runtime, and initializing the function code.

✻ With SnapStart, Lambda initializes your function when you publish a function version. Lambda takes a Firecracker microVM snapshot of the memory and disk state of the initialized execution environment, encrypts the snapshot, and caches it for low-latency access. 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.

⚠️ Important
➣ If your applications depend on uniqueness of state, you must evaluate your function code and verify that it is resilient to snapshot operations. For more information, see Handling uniqueness with Lambda SnapStart.

SnapStart supports:
βœ… Java 11 runtime

SnapStart does not support:
❌ provisioned concurrency
❌ arm64
❌ Lambda Extensions
❌ EFS
❌ > 512 MB ephemeral storage

ℹ️ You can't use SnapStart on a function's unpublished version ($LATEST).

SnapStart vs Provisioned Concurrency

πŸ‘‰ Use Provisioned Concurrency if your application has strict cold start latency requirements.
πŸ‘‰ SnapStart helps you improve startup performance by up to 10x at no extra cost.
❗ You can't use both SnapStart and Provisioned Concurrency on the same function version.

#Lambda
πŸ”₯6πŸ‘1
β€‹β€‹πŸ“™ AWS Lambda Container Architecture

https://arxiv.org/pdf/2305.13162.pdf

#Lambda
πŸ‘7
β€‹β€‹βš’οΈ lambda-debug is a tool that enables you to invoke Lambda functions in the cloud from any event source and intercept the requests with breakpoints locally.

https://github.com/ljacobsson/lambda-debug

🏠 Local debugging: Set breakpoints in your code and step through your functions invocations locally on native events triggered in the cloud.
πŸ‘ No code changes: No need to modify your code to enable debugging. Just add some dev dependencies and some configuration.
πŸ” Same IAM permissions: Your functions will run with the same IAM permissions as they do in the cloud.
⚑ Fast iterations: No need to deploy your code to the cloud to test changes. Just save your code and invoke your functions in the cloud.

#Lambda
❀6πŸ”₯6πŸ‘2