Deploying your application to an ECS cluster
Deploying to ECS is seamless; however, we need to create a profile on Docker that will use AWS credentials to be able to interact with AWS and provision resources.
Therefore, we need to create a Docker Context that’s specific to AWS ECS scenarios:
$ docker context create ecs guide-to-compose ? Create a Docker context using: [Use arrows to move, type to filter] > An existing AWS profile AWS secret and token credentials AWS environment variables ? Select AWS Profile [Use arrows to move, type to filter] default > guide-to-docker-compose Successfully created ecs context "guide-to-compose"
By using the credentials, the context will try to provision infrastructure or evaluate if infrastructure already exists for the Compose application. Thus, it is important for the user/role behind the AWS profile to have sufficient permissions for those actions.
Behind...