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