-
Notifications
You must be signed in to change notification settings - Fork 68
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
Normalize logical id of alias part in Lambda roles #77
Conversation
Locally ESLint as well as the testsuite passes. Will have to check why Travis fails. |
Had to upgrade eslint and the testsuite. However unit tests for the normalized roles are yet missing. |
@mbruning24 @arabold - Could you do a test with |
@HyperBrain sorry it's been a hectic couple weeks. I tested this out. Error looks great BTW! However, I found a HUGE bummer. API Gateway doesn't allow hyphens in the stage name! What a joke! I mean, come on AWS, it's a URL for crying out loud... The regex for that is /a-zA-Z0-9_/, so underscores are allowed by APIG, but ironically not by the regex! Maybe just switch that bad boy from hyphen to underscore and you'll have really done all you can. Hopefully AWS lets hyphens in stage names sometime in the future. Edit: Here's my sls output:
Edit 2: Found this error when trying to use an underscore
|
@mbruning24 That's indeed ridiculous. I'll add a light normalization to the stage name creation which only will transform the hyphen as you proposed. The hyphen issue on AWS side would imo justify to open a issue/case on their side. Stage names should comply with the official URL rules. |
@HyperBrain I've opened a support case with AWS in our company account. For now, I'd be happy with just underscore though, if you wouldn't mind changing that. |
No problem. Will do.
Mark Bruning <notifications@github.com> schrieb am Fr., 3. Nov. 2017, 8:05
nachm.:
… @HyperBrain <https://github.com/hyperbrain> I've opened a support case
with AWS in our company account. For now, I'd be happy with just underscore
though, if you wouldn't mind changing that.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#77 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFRM3nTEB8osjCBkYqc2nGGHelxV50ZSks5sy2PxgaJpZM4QKTQf>
.
|
@mbruning24 Sorry for the delay. Now, for stage names the hyphens are replaced by underscores. Did you get any valuable feedback from AWS yet? |
Turn hyphens to underscores in stage names Added unit tests for normalization Fixed regex. Updated dependencies and test framework. Fixed ESLint Normalize logical id of alias part in Lambda roles
e41fc07
to
a952250
Compare
…e-name Normalize logical id of alias part in Lambda roles
Fixes #68
Aliases can now include characters matching
[a-zA-Z0-9\-+_]+
.To generate a valid role logical id for the alias, the alias name is normalized by using the following table:
This should work as it is highly unlikely that someone uses one of the replacement strings in real alias names.