1 Answer
- Newest
- Most votes
- Most comments
1
Based on the logs, it seems the ECS task stopped when it failed to pull the secrets from the Secret Manager, causing CodeDeployment to fail. Though you have assigned the necessary permissions, ensure the ECS task can pull the secrets.
To debug that, make the ECS task healthy by skipping on loading the secrets in the app and logging in to the container through one of the methods
- Session Manager
- SSH Login
Once you enter the container using docker exec commands, run the AWS CLI secrets manager command and try to pull the secrets (test/secret/). If it fails, assign appropriate permissions and launch the task again.
answered 4 months ago
Relevant content
- asked 4 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated 2 years ago
Hi @Manikandan thanks for the reply. I found that need to add task role for the ECS to use other AWS services programatically and I gave necessary permissions to it and worked. NOTE: ECS automatically create the ecsTaskExecutionRole but ecsTaskRole need to create and assign it manually.