🆕 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
❌
ℹ️ You can't use SnapStart on a function's unpublished version (
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
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
Amazon
New – Accelerate Your Lambda Functions with Lambda SnapStart | Amazon Web Services
Update (December 7, 2022) – Added additional information about pricing. Our customers tell me that they love AWS Lambda for many reasons. On the development side they appreciate the simple programming model and ease with which their functions can make use…
🔥6👍1
⚒️
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
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
Lambda + Python 3.11
https://aws.amazon.com/blogs/compute/python-3-11-runtime-now-available-in-aws-lambda/
#Lambda
https://aws.amazon.com/blogs/compute/python-3-11-runtime-now-available-in-aws-lambda/
#Lambda
Amazon
Python 3.11 runtime now available in AWS Lambda | Amazon Web Services
You can build and deploy functions using Python 3.11 using the AWS Management Console, AWS CLI, AWS SDK, AWS SAM, AWS CDK, or your choice of Infrastructure as Code (IaC). You can also use the Python 3.11 container base image if you prefer to build and deploy…
🎉20❤2
🆕 Lambda x12 faster scaling! 🚀
https://aws.amazon.com/blogs/aws/aws-lambda-functions-now-scale-12-times-faster-when-handling-high-volume-requests/
#Lambda
https://aws.amazon.com/blogs/aws/aws-lambda-functions-now-scale-12-times-faster-when-handling-high-volume-requests/
Lambda function now scales by 1,000 concurrent executions every 10 seconds until the aggregate concurrency across all functions reaches the account’s concurrency limit.#Lambda
Amazon
AWS Lambda functions now scale 12 times faster when handling high-volume requests | Amazon Web Services
Now AWS Lambda scales up to 12 times faster. Each synchronously invoked Lambda function now scales by 1,000 concurrent executions every 10 seconds until the aggregate concurrency across all functions reaches the account’s concurrency limit. In addition, each…
👍1
Lambda + Python 3.12
https://aws.amazon.com/blogs/compute/python-3-12-runtime-now-available-in-aws-lambda/
#Lambda
https://aws.amazon.com/blogs/compute/python-3-12-runtime-now-available-in-aws-lambda/
#Lambda
🔥14
Добрая пятничная история
Пару недель назад AWS выкатил поддержку CloudFront OAC для Lambda function URLs, чтобы можно было удобно ходить в приватные Лямбды.
Сначала все обрадовались, полезное дело, безопасности, все дела, но после выяснилось, что работают лишь GET запросы, а на POST/PUT отдаётся ошибка.
Потом все расстроились, потому что зря обрадовались — ведь это не фича, а баг.
Но один хороший человек упоролся и выяснил, что если посчитать SHA256 хэш и добавить его в заголовок
https://twitter.com/rooToTheZ/status/1788606025265975505
Он написал запрос на обновление AWS документации для CloudFront и теперь там:
ℹ️ Note
If you use PUT or POST methods with your Lambda function URL, your user must provide a signed payload to CloudFront. Lambda doesn't support unsigned payloads.
В итоге расстроились и те, кто обрадовался, когда другие расстроились, потому что рано обрадовались.
Какая же здесь мораль? Документация — важна. Грамотно задокументированный баг всегда можно сделать фичей.
#CloudFront #Lambda
Пару недель назад AWS выкатил поддержку CloudFront OAC для Lambda function URLs, чтобы можно было удобно ходить в приватные Лямбды.
Сначала все обрадовались, полезное дело, безопасности, все дела, но после выяснилось, что работают лишь GET запросы, а на POST/PUT отдаётся ошибка.
Потом все расстроились, потому что зря обрадовались — ведь это не фича, а баг.
Но один хороший человек упоролся и выяснил, что если посчитать SHA256 хэш и добавить его в заголовок
x-amz-content-sha256, то и POST/PUT тоже работают.https://twitter.com/rooToTheZ/status/1788606025265975505
Он написал запрос на обновление AWS документации для CloudFront и теперь там:
ℹ️ Note
If you use PUT or POST methods with your Lambda function URL, your user must provide a signed payload to CloudFront. Lambda doesn't support unsigned payloads.
В итоге расстроились и те, кто обрадовался, когда другие расстроились, потому что рано обрадовались.
Какая же здесь мораль? Документация — важна. Грамотно задокументированный баг всегда можно сделать фичей.
#CloudFront #Lambda
X (formerly Twitter)
David Behroozi (@rooToTheZ) on X
My wayward sons! Remember that CloudFront Lambda OAC release we were super sad about because it didn't support PUT/POST? IT ACTUALLY DOES! You just need to calculate the SHA256 hash of the body client side and set the x-amz-content-sha256 header to it. I…
😁8👍7
Простая рабоче-крестьянская Lambda@Edge для добавления парольной аутентификации сайтам на CloudFront + S3:
https://towardsaws.com/a-short-guide-in-using-lambda-edge-to-password-protect-your-development-and-staging-environments-1ce5faacb8f8
#Lambda
https://towardsaws.com/a-short-guide-in-using-lambda-edge-to-password-protect-your-development-and-staging-environments-1ce5faacb8f8
#Lambda
Medium
A Short Guide in Using Lambda@Edge to Password-Protect Your Development and Staging Environments
When developing and hosting a static website or web application in AWS using Amazon S3, it’s a standard practice to build development…
😁6👍4💩1
VS-Code редактор в AWS Console для Lambda:
https://aws.amazon.com/blogs/compute/introducing-an-enhanced-in-console-editing-experience-for-aws-lambda/
#Lambda
https://aws.amazon.com/blogs/compute/introducing-an-enhanced-in-console-editing-experience-for-aws-lambda/
#Lambda
🔥30
Forwarded from AWS History
10 лет назад вышла AWS Lambda. 🎉
https://aws.amazon.com/about-aws/whats-new/2014/11/13/introducing-aws-lambda/
Serverless пошёл второй десяток.
#Lambda #Serverless
https://aws.amazon.com/about-aws/whats-new/2014/11/13/introducing-aws-lambda/
Serverless пошёл второй десяток.
#Lambda #Serverless
🔥12🎉7👍2👎1
Lambda + Python 3.13
https://aws.amazon.com/blogs/compute/python-3-13-runtime-now-available-in-aws-lambda/
#Lambda
https://aws.amazon.com/blogs/compute/python-3-13-runtime-now-available-in-aws-lambda/
#Lambda
Amazon
Python 3.13 runtime now available in AWS Lambda | Amazon Web Services
This post is written by Julian Wood, Principal Developer Advocate, and Leandro Cavalcante Damascena, Senior Solutions Architect Engineer. AWS Lambda now supports Python 3.13 as both a managed runtime and container base image. Python is a popular language…
❤6
🆕 Lambda SnapStart + Python / .NET
https://aws.amazon.com/blogs/aws/aws-lambda-snapstart-for-python-and-net-functions-is-now-generally-available/
Фича SnapStart, ускоряющая ColdStart Лямбды в 10 раз, теперь и для Python, и для .NET.
Два года была доступна лишь Java, поддержка других определённо затянулась, хотя фича реально полезная. Что ж, ждём тестов.
P.S. Вадим Казулкин, который наклепал десятки полезных материалов по ColdStart для Java, теперь получит ещё в два раза больше работы. 😀
#Lambda
https://aws.amazon.com/blogs/aws/aws-lambda-snapstart-for-python-and-net-functions-is-now-generally-available/
Фича SnapStart, ускоряющая ColdStart Лямбды в 10 раз, теперь и для Python, и для .NET.
Два года была доступна лишь Java, поддержка других определённо затянулась, хотя фича реально полезная. Что ж, ждём тестов.
P.S. Вадим Казулкин, который наклепал десятки полезных материалов по ColdStart для Java, теперь получит ещё в два раза больше работы. 😀
#Lambda
Amazon
AWS Lambda SnapStart for Python and .NET functions is now generally available | Amazon Web Services
AWS Lambda SnapStart boosts Python and .NET functions' startup times to sub-second levels, often with minimal code changes, enabling highly responsive and scalable serverless apps.
👍11
Lambda + Node.js 22
https://aws.amazon.com/blogs/compute/node-js-22-runtime-now-available-in-aws-lambda/
#Lambda
https://aws.amazon.com/blogs/compute/node-js-22-runtime-now-available-in-aws-lambda/
#Lambda
Amazon
Node.js 22 runtime now available in AWS Lambda | Amazon Web Services
This post is written by Julian Wood, Principal Developer Advocate, and Andrea Amorosi, Senior SA Engineer. You can now develop AWS Lambda functions using the Node.js 22 runtime, which is in active LTS status and ready for production use. Node.js 22 includes…
🔥1
Lambda best practices:
https://aws.amazon.com/blogs/compute/handling-billions-of-invocations-best-practices-from-aws-lambda/
🔸 Stateless functions: Ensure functions do not maintain state between invocations.
🔹 Service over custom code: Utilize AWS services instead of writing custom solutions.
🔸 Decouple components: Minimize dependencies between services to enhance scalability.
🔹 Idempotent operations: Design functions to handle repeated events safely.
🔸 On-demand processing: Process events as they occur, avoiding batch processing.
🔹 Use Step Functions: Consider Step Functions for complex workflows.
🔸 Multiple AWS accounts: Manage quotas and isolation by using separate accounts.
#Lambda
https://aws.amazon.com/blogs/compute/handling-billions-of-invocations-best-practices-from-aws-lambda/
🔸 Stateless functions: Ensure functions do not maintain state between invocations.
🔹 Service over custom code: Utilize AWS services instead of writing custom solutions.
🔸 Decouple components: Minimize dependencies between services to enhance scalability.
🔹 Idempotent operations: Design functions to handle repeated events safely.
🔸 On-demand processing: Process events as they occur, avoiding batch processing.
🔹 Use Step Functions: Consider Step Functions for complex workflows.
🔸 Multiple AWS accounts: Manage quotas and isolation by using separate accounts.
#Lambda
Amazon
Handling billions of invocations – best practices from AWS Lambda | Amazon Web Services
This post is written by Anton Aleksandrov, Principal Solution Architect, AWS Serverless and Rajesh Kumar Pandey, Principal Engineer, AWS Lambda AWS Lambda is a highly scalable and resilient serverless compute service. With over 1.5 million monthly active…
👍10
Вы уже переписали свои Лямбды на Rust? Нет? Тогда до августа у вас есть ещё время!
https://aws.amazon.com/blogs/compute/aws-lambda-standardizes-billing-for-init-phase/
TL;DR:
Раньше, и пока ещё, cold-start время не биллится (нахаляву). Поэтому можно былописать на Java и не париться не обращать внимания на эффективность кода Лямбд, который просто долго стартует.
Если у вас не было проблем с такими функциями, то ничего и не заметите.
Ежели заметите — стоит почитать про LLRT, оптимизацию производительности Lambda или наконец просто перейти на Step Functions. 😁
#Lambda
https://aws.amazon.com/blogs/compute/aws-lambda-standardizes-billing-for-init-phase/
Effective August 1, 2025, AWS will standardize billing for the initialization (INIT) phase across all AWS Lambda function configurations. This change specifically affects on-demand invocations of Lambda functions packaged as ZIP files that use managed runtimes, for which the INIT phase duration was previously unbilled.
TL;DR:
Раньше, и пока ещё, cold-start время не биллится (нахаляву). Поэтому можно было
Если у вас не было проблем с такими функциями, то ничего и не заметите.
Ежели заметите — стоит почитать про LLRT, оптимизацию производительности Lambda или наконец просто перейти на Step Functions. 😁
#Lambda
Amazon
AWS Lambda standardizes billing for INIT Phase | Amazon Web Services
Effective August 1, 2025, AWS will standardize billing for the initialization (INIT) phase across all AWS Lambda function configurations. This change specifically affects on-demand invocations of Lambda functions packaged as ZIP files that use managed runtimes…
🤔8😁3👍2
Логи Lambda теперь дешевле
https://aws.amazon.com/blogs/compute/aws-lambda-introduces-tiered-pricing-for-amazon-cloudwatch-logs-and-additional-logging-destinations/
Если у вас их было очень много (терабайты - но зачем?), то экономия существенная.
Возможность слать логи в S3 выглядит привлекательно, но как понимаю, это в довесок к CloudWatch, а не вместо — экономия лишь на хранении (а основной расход - ingestion).
#Lambda #CloudWatch #S3
https://aws.amazon.com/blogs/compute/aws-lambda-introduces-tiered-pricing-for-amazon-cloudwatch-logs-and-additional-logging-destinations/
Если у вас их было очень много (терабайты - но зачем?), то экономия существенная.
Возможность слать логи в S3 выглядит привлекательно, но как понимаю, это в довесок к CloudWatch, а не вместо — экономия лишь на хранении (а основной расход - ingestion).
#Lambda #CloudWatch #S3
Amazon
AWS Lambda introduces tiered pricing for Amazon CloudWatch logs and additional logging destinations | Amazon Web Services
Effective logging is an important part of an observability strategy when building serverless applications using AWS Lambda. Lambda automatically captures and sends logs to Amazon CloudWatch Logs. This allows you to focus on building application logic rather…
🍾2
Дебажим Lambda, запущенную в AWS, локально в VS Code: 🎉
https://aws.amazon.com/blogs/aws/simplify-serverless-development-with-console-to-ide-and-remote-debugging-for-aws-lambda/
#Lambda
https://aws.amazon.com/blogs/aws/simplify-serverless-development-with-console-to-ide-and-remote-debugging-for-aws-lambda/
#Lambda
🔥42👍6