Skip to content

Unable to use stageVariables from integrations #12

@henhal

Description

@henhal

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions