Developing Serverless Solutions Tnc218

Title

AWS re:Invent 2023 - Developing serverless solutions (TNC218)

Summary

  • Introduction: Walid Al-Khatib, a technical instructor at AWS, presents on developing serverless solutions.
  • Module 1: Focuses on building asynchronous event-based solutions using Amazon EventBridge and Amazon SNS. It covers how Lambda functions are invoked asynchronously, strategies for clients to check the status of their requests, and features of EventBridge such as event buses, rules, event archiving, schema discovery, and integration with third-party SaaS applications.
  • Module 2: Discusses poll-based event-driven solutions, particularly Amazon SQS, Kinesis Data Streams, and DynamoDB Streams. It explains how Lambda functions are invoked using poll-based event sources, the differences between queues and streams, and best practices for using SQS and streams as event sources for Lambda.
  • Module 3: Covers continuous integration, continuous delivery, and continuous deployment (CI/CD) in serverless applications. It highlights the importance of CI/CD, tools for serverless pipelines, AWS SAM, and best practices for automation. The module also emphasizes the use of separate AWS accounts for different environments, a single SAM template across environments, and the management of secrets using AWS Systems Manager Parameter Store.

Insights

  • Asynchronous Invocation: Asynchronous invocation of Lambda functions allows for non-blocking calls, where the client does not wait for a response from the server. This is suitable for event-driven architectures where the order of execution is not critical.
  • EventBridge vs. SNS: EventBridge offers advanced routing rules, schema registry, and integration with third-party SaaS applications, while SNS is better suited for creating email lists, sending texts, and implementing webhook or WebSocket patterns.
  • Poll-based Invocation: Poll-based invocation is used when the order of messages is important, such as with SQS FIFO queues. It is also used when processing a stream of data, as with Kinesis Data Streams and DynamoDB Streams.
  • CI/CD in Serverless: CI/CD is crucial for serverless applications to ensure consistent and repeatable deployment processes. AWS provides a suite of tools like CodeCommit, CodeBuild, and CodePipeline to facilitate CI/CD workflows.
  • AWS SAM and CDK: AWS SAM is tailored for deploying serverless resources and supports guided deployments, while AWS CDK allows developers to define infrastructure using familiar programming languages.
  • Best Practices: Automating tests, using separate AWS accounts for different environments, maintaining a single SAM template across environments, and managing secrets with AWS Systems Manager Parameter Store are recommended best practices for serverless CI/CD pipelines.