10 Things Serverless Architects Should Know
AWS Architecture Blog10 Things Serverless Architects Should Knowby Justin Pirtle | on23 JUL 2019| inAdvanced (300),Architecture,AWS Lambda,AWS Step Functions,Serverless|Permalink|ShareBuilding on the first three parts of the AWS Lambda scaling and best practices series where you learnedhow to design serverless apps for massive scale,AWS Lambda’s different invocation models, andbest practices for developing with AWS Lambda, we now invite you to take your serverless knowledge to the next level by reviewing the following 10 topics to deepen your serverless skills.1: API and Microservices DesignWith the move to microservices-based architectures, decomposing monothlic applications and de-coupling dependencies is more important than ever. Learn more about how to design and deploy your microservices withAmazon API Gateway:An overview of designing microservicesBuilding API-drive Microservices with API GatewayBest practices for building enterprise grade APIs with API GatewayWhitepaper: Microservices on AWSGet hands-on experience building out a serverless API with API Gateway, AWS Lambda, andAmazon DynamoDBpowering a serverless web application by completing the self-pacedWild Rydes web application workshop.Figure 1: WildRydes serverless web application workshop2: Event-driven Architectures and Asynchronous Messaging PatternsWhen building event-driven architectures, whether you’re looking for simple queueing and message buffering or a more intricate event-basedchoreography pattern, it’s valuable to learn about the mechanisms to enable asynchronous messaging and integration. These are enabled primarily through the use of queues or streams as a message buffer and topics forpub/sub messaging. Understand when to use each and the unique advantages and features of all three:Serverless Streams, Topics, and Queues: How to Pick the Right Serverless Application patternBest Practices for Serverless Queue ProcessingGets hands-on experience building a real-time data processing application usingAmazon Kinesis Data Streamsand AWS Lambda by completing the self-pacedWild Rydes data processing workshop.3: Workflow Orchestration in a Distributed, Microservices EnvironmentIn distributed microservices architectures, you must design coordinated transactions in different ways than traditional database-based ACID transactions, which are typically implemented using a monolithic relational database. Instead, you must implement coordinated sequenced invocations across services along with rollback and retry mechanisms. For workloads where there a significant orchestration logic is required and you want to use more of anorchestrator patternthan the event choreography pattern mentioned above,AWS Step Functionsenables the building complex workflows and distributed transactions through integration with a variety of AWS services, including AWS Lambda. Learn about the options you have to build your business workflows and keep orchestration logic out of your AWS Lambda code:Building Business Workflows with AWS Step FunctionsServerless State Management and Orchestration for Modern AppsGet hands-on experience building an image processing workflow using computer vision AI services withAWS Rekognitionand AWS Step Functions to orchestrate all logic and steps with the self-pacedServerless image processing workflow workshop.Figure 2: Several AWS Lambda functions managed by an AWS Step Functions state machine4: Lambda Computing Environment and Programming ModelThough AWS Lambda is a service that is quick to get started, there is value in learning more about the AWS Lambda computing environment and how to take advantage of deeper performance and cost optimization strategies with the AWS Lambda runtime. Take your understanding and skills of AWS Lambda to the next level:Lambda Under the HoodLambda Layers, the Runtime API, and Nested ApplicationsOptimizing Serverless Applications5: Serverless Deployment Automation and CI/CD PatternsWhen dealing with a large number of microservices or smaller components—such as AWS Lambda functions all working together as part of a broader application—it’s critical to integrate automation and code management into your application early on to efficiently create, deploy, and version your serverless architectures. AWS offers several first-party deployment tools and frameworks for Serverless architectures, including theAWS Serverless Application Model(SAM), theAWS Cloud Development Kit(CDK),AWS Amplify, andAWS Chalice. Additionally, there are several third party deployment tools and frameworks available, such as theServerless Framework,Claudia.js,Sparta, orZappa. You can also build your own custom-built homegrown framework. The important thing is to ensure your automation strategy works for your use case and team, and supports your planned data source integrations and development workflow. Learn more about the available options:Accelerate Serverless Development using AWS SAM and the Serverless Application RepositoryDeep Dive into AWS SAMInfrastructure is Code with the AWS Cloud Development KitDeploying and Consuming Serverless Functions with AWS AmplifyLearn how to build a full CI/CD pipeline and other DevOps deployment automation with the following workshops:WildRydes DevOps workshop with CodeStar and SAMAWS Cloud Developer Kit (CDK) workshop6: Serverless Identity Management, Authentication, and AuthorizationModern application developers need to plan for and integrate identity management into their applications while implementing robust authentication and authorization functionality. WithAmazon Cognito, you can deploy serverless identity management and secure sign-up and sign-in directly into your applications. Beyond authentication, Amazon API Gateway also allows developers to granularly manage authorization logic at the gateway layer and authorize requests directly, without exposing their using several types of native authorization.Learn more about the options and benefits of each:Serverless Authentication and Authorization: Identity management for your Serverless applicationsAuthentication for your applications: Getting started with Amazon CognitoGet hands-on experience working with Amazon Cognito,AWS Identity and Access Management(IAM), and Amazon API Gateway with theServerless Identity Management, Authentication, and Authorization Workshop.Figure 3: Serverless Identity Management, Authentication, and Authorization Workshop7: End-to-End Security TechniquesBeyond identity and authentication/authorization, there are many other areas to secure in a serverless application. These include:Input and request validationDependency and vulnerability managementSecure secrets storage and retrievalIAM execution roles and invocation policiesData encryption at-rest/in-transitMetering and throttling accessRegulatory compliance concernsThankfully, there are AWS offerings and integrations for each of these areas. Learn more about the options and benefits of each:Securing Enterprise-grade Serverless ApplicationsSecuring Serverless and Container ServicesWhitepaper: Security Overview of AWS LambdaGet hands-on experience adding end-to-end security with the techniques mentioned above into a serverless application with theServerless Security Workshop.8: Application Observability with Comprehensive Logging, Metrics, and TracingBefore taking your application to production, it’s critical that you ensure your application is fully observable, both at a microservice or component level, as well as overall through comprehensive logging, metrics at various granularity, and tracing to understand distributed system performance and end user experiences end-to-end. With many different components making up modern architectures, having centralized visibility into all of your key logs, metrics, and end-to-end traces will make it much easier to monitor and understand your end users’ experiences. Learn more about the options for observability of your AWS serverless application:Monitoring Modern Applications using AWS X-rayDeep Dive into X-Ray9. Ensuring Your Application is Well-ArchitectedAdding onto the considerations mentioned above, we suggest architecting your applications more holistically to the AWS Well-Architected framework. This framework includes the five key pillars: security, reliability, performance efficiency, cost optimization, and operational excellence. Additionally, there is a serverless-specific lens to the Well-Architected framework, which more specifically looks at key serverless scenarios/use cases such as RESTful microservices, Alexa skills, mobile backends, stream processing, and web applications, and how they can implement best practices to be Well-Architected. More information:Whitepaper: AWS Well-Architected FrameworkWhitepaper: Serverless Application Lens to the AWS Well-Architected Framework10. Continuing your Learning as Serverless Computing Continues to EvolveAs we’ve discussed, there are many opportunities to dive deeper into serverless architectures in a variety of areas. Though the resources shared above should be helpful in familiarizing yourself with key concepts and techniques, there’s nothing better than continued learning from others over time as new advancements come out and patterns evolve.Ongoing live Serverless Twitch workshops series:Happy Little APIsand ourBuild On ServerlessAWS Online Tech Talks:These free online talks are offered in subjects ranging all of AWS and dive deep into specific topics and domains, along with offering live Q&A.Subscribe hereto be notified of the upcoming online talks each month.re:Invent, regional summits, and other events: Consider attending in-person AWS events and joining sessions and workshops relevant to your application’s use case. Check out theevents catalogof all upcoming events.AWS Meetups: Consider joining a local AWS Meetup group in your area. Find a list of Meetup groups for AWS onMeetup.com.Learn how other customers are using Serverless: You can readServerless customers’stories or hear first-hand from them in theThis is My Architecture video series.Finally, we encourage you to check back often as we’ll be continuing further blog post series on serverless architectures, with the next series focusing on API design patterns and best practices.TAGS:amazon api gateway,aws lambda,AWS Step Functions,DynamoDB,Kinesis Data Streams,microservices,serverless architectures,well architectedJustin PirtleJustin Pirtle is a specialist Solutions Architect at Amazon Web Services, focused on the Serverless platform. He’s responsible for helping customers design, deploy, and scale serverless applications using services such as AWS Lambda, Amazon API Gateway, Amazon Cognito, and Amazon DynamoDB. He is a regular speaker at AWS conferences, including re:Invent, as well as other AWS events. Justin holds a bachelor’s degree in Management Information Systems from the University of Texas at Austin and a master’s degree in Software Engineering from Seattle University.
Building on the first three parts of the AWS Lambda scaling and best practices series where you learned how to design serverless apps for massive scale, AWS Lambda’s different invocation models, and best practices for developing with AWS Lambda, we now invite you to take your serverless knowledge to the next level by reviewing the […]
Justin Pirtle
Advanced (300) Architecture AWS Lambda AWS Step Functions Serverless