Description:
executing sam validate fails on serverless-application-model/examples/2016-10-31/api_backend/template.yaml
Steps to reproduce the issue:
1.execute "sam validate" on serverless-application-model/examples/2016-10-31/api_backend/template.yaml
Observed result:
sam template fails validation with following:
Error: [InvalidResourceException('GetFunction', "Policy at index 0 in the 'Policies' property is not valid"), InvalidResourceException('PutFunction', "Policy at index 0 in the 'Policies' property is not valid"), InvalidResourceException('DeleteFunction', "Policy at index 0 in the 'Policies' property is not valid")] ('DeleteFunction', "Policy at index 0 in the 'Policies' property is not valid") ('GetFunction', "Policy at index 0 in the 'Policies' property is not valid") ('PutFunction', "Policy at index 0 in the 'Policies' property is not valid")
Expected result:
sam template succeeds validation
additionally the package.json is missing, which may/or may not confuse some novice users.
It may be useful to include a README.md similiar to the api_cognito_auth example.
The indentation is not correct. if you add one more tab at TableName
e.g.
Policies:
- DynamoDBReadPolicy:
TableName: !Ref Table
Then the validation will pass through
Most helpful comment
The indentation is not correct. if you add one more tab at TableName
e.g.
Then the validation will pass through