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?
I followed the example regarding usage of
stageVariablesfrom integrations:But when I deploy, I get this:
I've verified that
LambdaArnis 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
stageVariablesdoes not work?