[ECS] [request]: Add error message to service or task log when a secrets manager secret field isn't found
- Dominant language
- Shell
- Stars
- 5.4k
- Forks
- 334
- PR merge metrics
- No merged PRs in 30d
Description
### Community Note
* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
* If you are interested in working on this issue or have submitted a pull request, please leave a comment
**Tell us about your request**
I made a mistake and didn't update the secret for one of my environments with a field that was added since the last deployment. There was no help from the ECS web UI for finding the cause of the problem. As I went through the setup, I remembered to check the secret and update it, which sorted out the issue.
The request is for more error logging in the web UI around task startup.
**Which service(s) is this request for?**
My use case is EC2 ECS, but I don't know if this affects any other services.
**Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?**
I was deploying a version of my service this morning, and got very confused when the service logs entirely consisted of lines like this.
```
03/12/2021, 10:22:57 | (service redacted-service-CCAService24EB370B-plUYGBPW8iUD, taskSet ecs-svc/5757939381167604702) has started 2 tasks: (task eb766f60696247a4b2ca82596058a2e1) (task f2463a5330b14511a0a9a5a328a5fb78).
-- | --
```
There were no other log entries in the service showing what the problem might have been in that period between starting the tasks and the point that something in the container causes an image (the usual reason for a failing task).
**Are you currently working around this issue?**
We do have access to the amazon-ecs-agent logs, which I hadn't thought to check before fixing the issue. That does have enough info on the failure, but it's exposed in a different place so not top of mind when digging through the cluster.
Contributor guide
Research direction
Start by reproducing the EC2 ECS deployment failure described in the issue, using a Secrets Manager secret that lacks a newly required field. Compare the ECS service/task logs with the amazon-ecs-agent logs mentioned in the report. Done means the relevant failure is surfaced in the ECS service or task log and helps identify the missing secret field.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud, observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100