AWS Notes
5.61K subscribers
487 photos
43 videos
10 files
2.86K 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
​​📙 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
Добрая пятничная история

Пару недель назад 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
😁8👍7
AWS Lambda’s recursive loop detection + S3 🎉

Starting July 8, 2024, recursive invocations that pass through Lambda and S3 where S3 is NOT the event source or trigger to the Lambda function will be detected and terminated after approximately 16 recursive invocations.


#Lambda
👏19👍1
Forwarded from AWS History
10 лет назад вышла AWS Lambda. 🎉

https://aws.amazon.com/about-aws/whats-new/2014/11/13/introducing-aws-lambda/

Serverless пошёл второй десяток.

#Lambda #Serverless
🔥12🎉7👍2👎1
🆕 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
👍11
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
👍10