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
API Gateway proxy Lambda loses permissions when functionName is changed #5306
Labels
@aws-cdk/aws-apigateway
Related to Amazon API Gateway
@aws-cdk/aws-lambda
Related to AWS Lambda
bug
This issue is a bug.
p1
Comments
masse-solita
added
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
labels
Dec 5, 2019
masse-solita
changed the title
Changing the functionName of API Gateway proxy Lambda loses permissions.
API Gateway proxy Lambda loses permissions when functionName is changed
Dec 5, 2019
SomayaB
added
@aws-cdk/aws-apigateway
Related to Amazon API Gateway
@aws-cdk/aws-lambda
Related to AWS Lambda
labels
Dec 5, 2019
Ack'ing this issue. Changing the function name in a API Gateway Lambda integration does break the integration. Repro code - import lambda = require('@aws-cdk/aws-lambda');
import apig = require('@aws-cdk/aws-apigateway');
import core = require('@aws-cdk/core');
const app = new core.App();
const stack = new core.Stack(app, 'mystack');
const handler = new lambda.Function(stack, 'myfunction', {
functionName: 'myfunctionname-1',
code: lambda.Code.fromAsset('resources'),
runtime: lambda.Runtime.NODEJS_10_X,
handler: 'index.handler'
});
const restapi = new apig.RestApi(stack, 'myrestapi');
restapi.root.addMethod('ANY', new apig.LambdaIntegration(handler)); |
nija-at
added
p1
and removed
needs-triage
This issue or PR still needs to be triaged.
labels
Dec 7, 2019
Omg spent 2 days figuring out why i get an |
nija-at
pushed a commit
that referenced
this issue
Jun 30, 2020
… name is modified Changing function name triggers a resource replacement - the old function is removed and replaced with a new function. However, the RestApi deployment remains untouched and is still pointing at the ARN of the, now stale, function. The fix is to trigger a new deployment if the function name changes. fixes #5306
nija-at
pushed a commit
that referenced
this issue
Jun 30, 2020
… name is modified Changing function name triggers a resource replacement - the old function is removed and replaced with a new function. However, the RestApi deployment remains untouched and is still pointing at the ARN of the, now stale, function. The fix is to trigger a new deployment if the function name changes. fixes #5306
mergify bot
pushed a commit
that referenced
this issue
Jul 2, 2020
… name is modified (#8813) Changing function name triggers a resource replacement - the old function is removed and replaced with a new function. However, the RestApi deployment remains untouched and is still pointing at the ARN of the, now stale, function. The fix is to trigger a new deployment if the function name changes. fixes #5306 ---- *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-apigateway
Related to Amazon API Gateway
@aws-cdk/aws-lambda
Related to AWS Lambda
bug
This issue is a bug.
p1
Reproduction Steps
Error Log
API Gateway fails to invoke the function and reports:
Execution failed due to configuration error: Invalid permissions on Lambda function
Environment
Other
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: