Best practices for serverless developers (SVS401)

Best Practices for Serverless Developers

The Evolution of Serverless

  • The cloud was born "serverless" with the launch of services like S3 and SQS in 2006
  • Serverless really came alive in 2014 with the launch of AWS Lambda and ECS with Fargate
  • There are now a huge number of serverless services across compute, storage, workflows, databases, analytics, and more
  • Serverless is transforming how software is built, allowing faster iteration and faster time-to-market

Serverful Serverless

  • As applications become more serverless, they rely more on external managed services
  • This allows taking advantage of native service capabilities and letting AWS handle the undifferentiated heavy lifting
  • It can also lower costs and improve resilience
  • Orchestration (e.g. Step Functions) and choreography (e.g. EventBridge) can be used for service communication

Reducing Code with Serverless Services

  • Managed services like EventBridge pipes can eliminate the need for Lambda functions
  • Step Functions can also reduce code by using direct SDK integrations instead of Lambda

Using Serverless Functions and Containers

  • Lambda provides an event-driven execution model with over 140 integrations
  • Lambda performance is mostly "plug and play", with memory configuration being the main tuning parameter
  • Understanding the Lambda lifecycle, including cold starts, is important for optimizing performance and cost

Scaling Serverless Services

  • Concurrency is the key metric for understanding Lambda scale and performance
  • Reserved and Provisioned Concurrency can help mitigate cold starts
  • Account and service-level scaling quotas have been dramatically increased

Using Containers with ECS and Fargate

  • ECS provides a fully managed control plane, while Fargate is the serverless data plane
  • Containers provide more flexibility and control compared to Lambda, with the trade-off of more management overhead
  • Containers can be more cost-effective for high concurrency workloads

Best Practices for Scaling Serverless Best Practices

  • Service Blueprints: GitHub templates that encode serverless best practices
  • Architectural Patterns: Reusable building blocks for common serverless architectures

What's Next for Serverless?

  • Continued improvements to the developer experience, with features like the new Lambda console and Application Builder in the AWS Toolkit
  • More governance and control features, like the new private API Integrations for Step Functions and EventBridge
  • Broader and simpler Integrations to enable doing more with serverless services

Your Digital Journey deserves a great story.

Build one with us.

Cookies Icon

These cookies are used to collect information about how you interact with this website and allow us to remember you. We use this information to improve and customize your browsing experience, as well as for analytics.

If you decline, your information won’t be tracked when you visit this website. A single cookie will be used in your browser to remember your preference.

Talk to us