0

I am trying to use s3 with api gateway. I have a stage variable that stored bucket name for each stage. But not able to use it in path override or path parameters enter image description here

instead of bucket/{key} want to use stageVariable.variable/{key}. I have tried using ${stageVariable.variable}/{key},'${stageVariable.variable}'/{key} Nothing is working.

1 Answer 1

1

Assuming you have a sage variable named bucketname:

enter image description here

You can reference this variable in the integration request as follows:

enter image description here

Please note, we reference a stage variable as ${stageVariables.name}, where the name is my case was bucketname. You can also find some examples in the AWS documentation: https://docs.aws.amazon.com/apigateway/latest/developerguide/stage-variables.html

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.