Summary
In this chapter, we created and integrated Lambda functions and an API gateway to replace the RDS and ECS services. We created a DynamoDB table and set up a way to automatically seed it when deploying the stack and created a step function state machine linked to SES. We also set up a GET
request to fetch all data from the DynamoDB table and a POST
request to insert data into the same table and trigger the state machine. Finally, we added the API Gateway and DynamoDB constructs to our CDK stack and removed the ECS, RDS, and VPC constructs from the Stack. As you’ve experienced, the process of applying changes and testing serverless logic can be time-consuming. In the next chapter, we’ll explore ways to streamline building serverless applications, specifically by optimizing our local environment for faster and more efficient development.