You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I followed the example regarding usage of stageVariables from integrations:
x-amazon-apigateway-integration:
type: aws_proxy
passthroughBehavior: when_no_match
httpMethod: POST
uri: ${stageVariables.LambdaArn}
But when I deploy, I get this:
An error occurred: ApiGatewayRestApi - Errors found during import:
Unable to put integration on 'POST' for resource at path '/test': Invalid ARN specified in the request
I've verified that LambdaArn is assigned as a stage variable.
If changing my integration to an absolute value, like arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:xxxxxyyyyzzz:function:test-api-dev/invocations, it works. And the stage variable has this exact value.
Any idea why referencing stageVariables does not work?
The text was updated successfully, but these errors were encountered:
Hello @henhal, I noticed that you had a need to use something like uri: ${stageVariables.LambdaArn} in the past. Have you found a solution to this? I am currently facing the same issue and am looking for a way to resolve it. Any updates or suggestions you have would be greatly appreciated.
@mefengl What works for me is something like this:
x-amazon-apigateway-integration:
type: aws_proxy
httpMethod: POST
uri: arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:583329677394:function:${stageVariables.LambdaName}/invocations
It didn't work when putting that entire string S a stage variable, only when building it like this, keeping everything up until function: outside the variable. No idea why.
I followed the example regarding usage of
stageVariables
from integrations:But when I deploy, I get this:
I've verified that
LambdaArn
is assigned as a stage variable.If changing my integration to an absolute value, like
arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:xxxxxyyyyzzz:function:test-api-dev/invocations
, it works. And the stage variable has this exact value.Any idea why referencing
stageVariables
does not work?The text was updated successfully, but these errors were encountered: