Skip to content

stageVariables in Swagger are not expanded #34

Closed

Description

@mparaz

When trying the serverless-application-model/examples/2016-10-31/api_swagger_cors/ example, the Lambda function name is not expanded.

I edited the swagger.yaml to add Role: to the Lambda as it's required in my environment. and then did packaging and deploying.

I went to the API Gateway console for Method Execution / ANY - Integration Request.
In the Lambda Function value,

Expected: the name of the Lambda function, dynamically assigned.
Got: ${stageVariables.LambdaFunctionName}

This happened when I was testing #20, after #20 (comment)

Activity

  1. sanathkr commented on Dec 6, 2016

    @sanathkr

    Were you able to call your API endpoint to invoke your Lambda function?

    Stage variables are stored as a property on the API Stage. You can view its value in the Stage section on console. Even though Console displays ${...}, your API endpoint should work if the stage variable value contains the Lambda function ARN

  2. mparaz commented on Dec 6, 2016

    @mparaz
    Author

    Thanks. I can call the API endpoint and I confirm that the stage variables are set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions