Use services instead of custom code - AWS Lambda

Use services instead of custom code

Serverless applications usually comprise several AWS services, integrated with custom code run in Lambda functions. While Lambda can be integrated with most AWS services, the services most commonly used in serverless applications are:

Category AWS service

Compute

AWS Lambda

Data storage

Amazon S3

Amazon DynamoDB

Amazon RDS

API

Amazon API Gateway

Application integration

Amazon EventBridge

Amazon SNS

Amazon SQS

Orchestration

AWS Step Functions

Streaming data and analytics

Amazon Kinesis Data Firehose

There are many well-established, common patterns in distributed architectures that you can build yourself or implement using AWS services. For most customers, there is little commercial value in investing time to develop these patterns from scratch. When your application needs one of these patterns, use the corresponding AWS service:

Pattern AWS service

Queue

Amazon SQS

Event bus

Amazon EventBridge

Publish/subscribe (fan-out)

Amazon SNS

Orchestration

AWS Step Functions

API

Amazon API Gateway

Event streams

Amazon Kinesis

These services are designed to integrate with Lambda and you can use infrastructure as code (IaC) to create and discard resources in the services. You can use any of these services via the AWS SDK without needing to install applications or configure servers. Becoming proficient with using these services via code in your Lambda functions is an important step to producing well-designed serverless applications.