-
Notifications
You must be signed in to change notification settings - Fork 4k
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 Lambda Auth: Lambda Resource Policy is not created from CDK #20234
Labels
@aws-cdk/aws-appsync
Related to AWS AppSync
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
Comments
VARG0S
added
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
labels
May 5, 2022
cm-iwata
added a commit
to cm-iwata/aws-cdk
that referenced
this issue
Jun 7, 2022
4 tasks
mergify bot
pushed a commit
that referenced
this issue
Jun 13, 2022
#20641) This PR will fix #20234 ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
daschaa
pushed a commit
to daschaa/aws-cdk
that referenced
this issue
Jul 9, 2022
aws#20641) This PR will fix aws#20234 ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
@aws-cdk/aws-appsync
Related to AWS AppSync
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
Describe the bug
When creating an AppSync GraphQL with Lambda Authorization from CDK, the authorization does not work by just deploying CDK. I need to go into the AppSync Settings Web Console and select a different Auth format, Save, and then change it back to my Lambda Auth details and Save again. I notice when I do this, a policy document gets added in the Lambda Web Console > Configuration tab > Resource-based policyInfo section called "AppSync". This does not exist when just deploying my cdk code, despite everything looking the same in the AppSync Settings Web UI.
I have not been able to figure out how to create the resource based policy document that seems to automagically get created when the AppSync Settings Save button is clicked.
The resource based policy document that gets created looks like this:
Expected Behavior
I would expect this resource policy to be created when CDK builds and deploys.
In this AWS CLI doc: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-lambdaauthorizerconfig.html
If mentions that the resource policy needs to be run manually, but web console does it automatically. It seems that CDK does not run this step.
Current Behavior
No errors, just no resource based policy document on the Authorization Lambda.
Reproduction Steps
//PACKAGE.JSON
/**
**/
Possible Solution
The equivalent of this snippet should be exposed in CDK or run behind the scenes for the auth lambda
aws lambda add-permission --function-name "arn:aws:lambda:us-east-2:111122223333:function:my-function" --statement-id "appsync" --principal appsync.amazonaws.com --action lambda:InvokeFunction
Additional Information/Context
No response
CDK CLI Version
2.23.0 (build 50444aa)
Framework Version
"@aws-cdk/aws-appsync-alpha": "^2.22.0-alpha.0",
Node.js Version
12
OS
MacOS
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: