aws-sam-cli
aws-sam-cli copied to clipboard
Validate Fails on AlexaSkillEvent
Repro:
git clone https://github.com/awslabs/serverless-application-model.git
cd serverless-application-model/examples/2016-10-31/alexa_skill
aws-sam-local validate template.yaml
File contents:
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: Alexa Skill https://developer.amazon.com/alexa-skills-kit
Resources:
AlexaSkillFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: s3://<bucket>/alexa_skill.zip
Handler: index.handler
Runtime: nodejs4.3
Events:
AlexaSkillEvent:
Type: AlexaSkill
output:
ERROR: Resource "AlexaSkillFunction", property "Events": Inner property Properties is required (line: 12; col: 8)
expected output: Success
You're right. Test checked into this repository has been modified to include Properties - template.yaml#L15. This needs to be fixed.
@iph Can you send a PR?
We're rewriting some of the library we use for CloudFormation/SAM parsing (github.com/awslabs/goformation) to make it more resilient against issues like this.
I can confirm this bug is fixed in the 0.1.0 branch of goformation, however we've got a bit more work to do before we can start using it in SAM Local. Shouldn't be much longer.
Fixed in v0.2.0