-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
appsync.GraphqlApi.addLambdaDataSource
doesn't strip symbols from id
name, causing deploy to fail
#16169
Comments
We use the |
I use '-' for all my id names in all CDK packages, and they always get stripped away. I could provide an example for you, just let me know what you would like because I'm not sure how to demonstrate it besides what I've mentioned. I never specify the name, just let the CDK generate one based off the |
Ah i see where the problem.. the data source was implemented as a construct instead of a resource.. |
We can sanitize the id before assigning it to the data source name:
I am unassigning and marking this issue as We use +1s to help prioritize our work, and are happy to revaluate this issue based on community feedback. You can reach out to the cdk.dev community on Slack to solicit support for reprioritization. |
I tried to created an S3 bucket using CDK with ID including various unusual characters as following: I compared the logical id in the aws console of cloudformation, and found all the unusual characters were stripped. By this logical analogy, I think we should stripe all of the characters except [_0-9A-Za-z] instead of just stripe '-' only. What do you think? @otaviomacedo @BryanPan342 @jquesada2016 , if you don't mind, I'd like try to solve this issue. |
|
…aws#18765) Closes aws#16169 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Doing something like the following:
does not remove the
-
from the id name, causing the deploy to fail with:And if we look at the resulting stack.template.json file, we see the error is present:
Reproduction Steps
Just create any appsync GraphQL API and add a lambda datasource that contains
-
. (haven't tested if other symbols also trip it up)What did you expect to happen?
I expect the
-
to be stripped out, just like all other id's in the CDK along with the deploy not failing.What actually happened?
The deploy fails.
Environment
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: