API Gateway stage variable always null

Viewed 1280

I am trying to use stage variables, but I always get this error:

{
  "logref": "some_uid",
  "message": "Invalid stage variable value: null.  Please use values with alphanumeric characters and the symbols ' ', -', '.', '_', ':', '/', '?', '&', '=', and ','."
}

My goal is to call SNS from API gateway without the need from the caller to specify the TopicArn and the Message in the query string.

So in the Integration Request I am mapping the query string TopicArn to stageVariables.TopicArn (I have tried '$stageVariables.TopicArn' as well).

And then in the Stage variables section in AWS console I input the Name TopicArn and the Value arn:aws:sns:my_region:my_account_id:test-topic

After I deployed my API I test it from the AWS console and I get this error:

{
  "logref": "some_uid",
  "message": "Invalid stage variable value: null.  Please use values with alphanumeric characters and the symbols ' ', -', '.', '_', ':', '/', '?', '&', '=', and ','."
}

What am I doing wrong, it his achievable?

0 Answers
Related