Content deleted Content added
No edit summary |
|||
Line 31:
AWS Serverless Hero Yan Cui recommends alternative code-sharing strategies using package managers (e.g., [[Npm|NPM]]) due to these constraints. <ref name=":1" />
== Lambda Destinations vs. Dead Letter Queues ==
==Best practices==▼
AWS Lambda Destinations provide advanced error handling and routing capabilities compared to Dead Letter Queues (DLQs). While DLQs only capture failed asynchronous invocations for manual processing, Lambda Destinations support both synchronous and asynchronous invocations. Lambda Destinations allow routing to various targets, such as Amazon SQS, SNS, EventBridge, or another Lambda function, based on the outcome of the invocation (success or failure). Destinations also include the ability to capture detailed contextual information about the invocation, such as request and response payloads, aiding in more granular monitoring and troubleshooting. This feature facilitates more dynamic and automated error-handling workflows in serverless applications. <ref>{{Cite book |title=Programming AWS Lambda: Build and Deploy Serverless Applications with Java |publisher=O'Reilly Media |isbn=9781492041023}}</ref><ref name=":1" />
▲== Best practices ==
Following [[DevSecOps]] practices can help end-users to use and secure Lambda-based applications more effectively. <ref>{{Cite book |last=Katzer |first=Jason |title=Learning Serverless: Design, Develop, and Deploy with Confidence |publisher=O'Reilly Media |year=2020 |isbn=978-1492057017}}</ref> In Lambda-based applications, the line between the infrastructure and business logic is blurred and the apps are usually spread across various services. According to Yan Cui, to get the most value from testing efforts, Lambda-based applications should be tested mainly for their integrations, and unit tests should be used only if there is a complex business logic. Also, to make debugging and implementation of Lambda-based easier, developers should use [[Orchestration (computing)|orchestration]] within the [[Domain-driven design|bounded context]] of a [[Microservices|microservice]], and should use [[Service choreography|choreography]] between the bounded-contexts.<ref name=":1">{{Cite book |last=Cui |first=Yan |title=Serverless Architectures on AWS |publisher=Manning |year=2020 |isbn=978-1617295423 |edition=2nd}}</ref>
|