Closed dbackeus closed 5 years ago
Fixed the error in PR #230. After running jets deploy
using my fixed branch I can verify that the actual deploy error reported by AWS was:
ERROR: Template format error: Unrecognized resource types: [AWS::Lambda::LayerVersion]
Possibly LayerVersion
isn't supported in the eu-north-1
region. Haven't found any official documentation on the topic but there is a forum post echoing the same issue: https://forums.aws.amazon.com/thread.jspa?messageID=892152
It would be nice if jets
would validate that the current region is supported and fail early with a nice error message instead of ending up with a half broken deploy and a cryptic error.
RE: undefined method .red
Thanks for the fix!
RE: Possibly LayerVersion isn't supported in the eu-north-1 region.
Yup, some regions don't fully support Lambda yet. Another user also ran into this on the community forums: Unrecognized resource types: [AWS::Lambda::LayerVersion]
This AWS Region Table Matrix helps.
RE: It would be nice if jets would validate that the current region is supported and fail early with a nice error message instead of ending up with a half broken deploy and a cryptic error.
Think so too. Though hesitant to add a check and then when AWS adds support to a region, we'll have to maintain that table. Thinking docs would be a better approach. Point the user to the docs as a helpful tip. Will take PRs for this.
Anyway, thanks for the fix!
Had a look at the matrix. Not sure what to look for to determine LayerVersion
support though? According to the matrix "Lambda" is supported in all regions. We're having a lab week at my company and I might be spending the whole week labbing with Jets so I might get time to improve your docs if I know what to look for :)
Yup. The AWS matrix doesn’t details on whether AWS Lambda Layers are supported for that specifically region. Sort got to brute force it to find out.
Think an FAQ item with the specific error message suffice. Can more quickly help users and point them there.
Checklist
jets upgrade
command that makes this a simple task. There's also an Upgrading Guide: http://rubyonjets.com/docs/upgrading/My Environment
Expected Behaviour
When running
jets deploy
it should give me a helpful error message if the deploy fails for whatever reason.I believe it actually worked the first time I ran it on this system but all subsequent times have had the same issues. Even when generating new apps from scratch.
Current Behavior
When running
jets deploy
after S3 bucket has been created and populated I get the following stack trace:Looking at the stack on Cloudfront it has only created the S3 bucket on the Cloudformation stack. No gateway API or lambda functions etc.
Step-by-step reproduction instructions
Solution Suggestion
This should be changed to
.color(:red)
: https://github.com/tongueroo/jets/blob/master/lib/jets/cfn/ship.rb#L69