serverless / serverless/serverless
logStreamNames failed to satisfy contraint
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 46.9k
- Forks
- 5.7k
- Avg merge
- 10h 7m
- Merged PRs (30d)
- 57
Description
This is a Bug Report
Description
For bug reports:
-
What went wrong?
Logs not showing up for function when runningsls logs -f graphql. -
What did you expect should have happened?
Logs should have showed up as normal. -
What was the config you used?
Relevant serverless.yaml -
What stacktrace or error message from your provider did you see?
Serverless Error ---------------------------------------
1 validation error detected: Value '[]' at 'logStreamNames' failed to satisfy constraint: Member must have length greater than or equal to 1
For feature proposals:
- What is the use case that should be solved. The more detail you describe this in the easier it is to understand for us.
- If there is additional config how would it look
Similar or dependent issues:
- #12345
Additional Data
The issue may be due to the nature of the log stream naming by CloudWatch. For example the current log stream was auto named date[24]random instead of the normal date[$LATEST]random. I am not sure why CloudWatch does this (the number in brackets seems to increment by one with re-deploys?).
- Serverless Framework Version you're using:
1.26.1 - Operating System:
Ubuntu 16.04 - Stack Trace:
- Provider Error messages:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing sls logs -f graphql with the linked serverless.yml configuration and inspect the reported logStreamNames validation error. Compare the deployed CloudWatch log-stream naming with the command's lookup assumptions; done means the command returns the function's logs without the empty-list constraint error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud, observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100