Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation fails on !Join #25

Closed
dipthegeezer opened this issue Aug 12, 2017 · 4 comments
Closed

Validation fails on !Join #25

dipthegeezer opened this issue Aug 12, 2017 · 4 comments
Labels

Comments

@dipthegeezer
Copy link

Hi

I have a SAM template that works fine when I deploy via the AWS cli using aws cloudformation package and deploy. However it fails via sam. I get the following validation error.

2017/08/12 21:08:31 0.1.0
2017/08/12 21:08:31 ERROR: did not find expected ',' or ']' (line: 7; col: 0)

The line in question has a !Join. Like the following:

AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: CRUD service
Outputs:
ApiUrl:
Description: URL of API endpoint
Value: !Join ['', ['https://', !Ref "MyApi", '.execute-api.', !Ref 'AWS::Region', '.amazonaws.com/Prod']]

I've omitted the remainder of the template for brevity.

@heitorlessa
Copy link
Contributor

heitorlessa commented Aug 12, 2017 via email

@sanathkr
Copy link
Contributor

I have a hunch what might be going on. Will take a detailed look once I get in front of the computer.

Is it failing on "sam local" calls or or on "sam validate" call?

@sanathkr sanathkr added the bug label Aug 13, 2017
@sanathkr
Copy link
Contributor

Just pushed a PR that fixes this bug. Since this blocks all sam local commands, we will release a new version once this PR gets approved. Hang tight!

PaulMaddox added a commit that referenced this issue Aug 13, 2017
!Join fails validation because of missing colon in regex. Fixes #25
@dipthegeezer
Copy link
Author

Cool, thanks for the quick turnaround!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants