From the course: AWS for Developers: Deploy a WordPress Blog with AWS CDK v2

Unlock the full course today

Join today to access over 24,500 courses taught by industry experts.

AWS ECS Fargate

AWS ECS Fargate

- [Narrator] All right, let's now talk about our container configuration. We are using an ECS pattern provided by the CDK, and in this case it's going to be an application load balance fargate service. So in this case, we're passing a container image that we're getting from the Amazon Public Registry, and this case is called library/WordPress:latest. So we can get whatever's the latest version of WordPress available in the internal public docker hop provided by Amazon to us. So we can just use this line right here, line 36 to get that latest image and run it inside our infrastructure. Now this image is going to require several configuration settings and we can pass them as environment variables. For example, DB name, DB user, DB password and the DB password, we're using a dynamic reference, which is a feature by Cloud Formation to go to Secrets Manager and get that password for us so that we can inject it in here.…

Contents