Sam validate always returns Valid!
See original GitHub issueThe tool sam validate is supposed to report errors when a SAM template is not valid.
Currently, it reports anything as valid.
steps to reproduce
cat "{}" > test.json
sam validate -t test.json
Expected - Some validation message
Actual - Valid!
Affects version
- snapshot local
- 0.2.2
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Sam validate always returns Valid! · Issue #203 - GitHub
The tool sam validate is supposed to report errors when a SAM template is not valid. Currently, it reports anything as valid.
Read more >sam validate - AWS Serverless Application Model
Verifies whether an AWS SAM template file is valid.
Read more >How to check for a valid Base64 encoded string - Stack Overflow
I want to avoid the "Invalid character in a Base-64 string" exception that happens if the value is not valid base 64 string....
Read more >Tips for SAM.gov Entity Validation Support - GovDelivery
We review these entity validation help tickets in the order they were received. ... Always include the required documentation.
Read more >A Practical Guide to Surviving AWS SAM Part 1 - Medium
Introduction to AWS SAM for serverless application deployment ... sam validate --template template.yaml ... return json.load(json_file)
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I made a Ruby script that will read the YAML into JSON and validate against the schema if anyone is interested. https://gist.github.com/metaskills/674d819f24f41ddb9664b0386d147ce0
Currently
sam validate
just checks whether the template is valid JSON/YAML.At initial launch, we did do further validation against the SAM specification, however the implementation had a few major bugs and caused a lot of problems for people. As such, we removed this functionality until it can be revisited.
We’ve recently done some work in the goformation to automatically generate a JSON Schema for the whole CloudFormation and SAM specification - which I think we could use within SAM Local to do this more advanced validation.