Complete Web Application Deployment with AWS CDK
In the previous chapter, we learned how to deploy a simple web service with AWS CDK by utilizing AWS ECS for hosting and DynamoDB as a database. We built a TODO application that created an API and a frontend React application. While we built a working full stack cloud application, there were a few problems with our deployment:
- Neither the frontend nor the backend was secured via TLS
- We had to copy over the API URL into the frontend and redeploy the stack to make things work
- The frontend code was being directly served from S3 with no distributed content delivery mechanism
In addition to that, having DynamoDB as a database is somewhat cheat code. Not every web application can switch databases overnight. Perhaps you want to move the IaC part of an existing application to AWS CDK. What if this application’s database is in MySQL?
We will attempt to address these points in this chapter. In summary, in this...