Add Permissions to CodeBuild Service Role

1. Navigate to the IAM console and select Roles.

image

2. Find the CodeBuild service role and click on it.

image

3. Click Add permissions, then select Attach policies.

image

4. Search for and select AmazonEC2ContainerRegistryFullAccess.

image

5. Search for and select SecretsManagerReadWrite. Click Add permissions.

image

6. Navigate back to your pipeline and rerun the build stage.

image

7. Wait approximately 10 minutes for the deploy stage to complete successfully.

image

Pipeline Process Overview: AWS CodeBuild creates a new container image and pushes it to the Amazon ECR repository. During the deploy stage, the fcj-core-fargate-td task definition is updated with a new revision containing the latest container image. The ECS service then updates to use this new task definition revision.