My lambda works locally and returns the JSON.
My API Gateway works locally, i.e. calls the lambda and returns the JSON.
However when I publish my API to my DEV stage and then try to use the invoke url - https://jbpqyp3142.execute-api.us-east-2.amazonaws.com/DEV I get
{"message":"Missing Authentication Token"}
Lambda:
require 'json'
def lambda_handler(event:, context:)
if event['queryStringParameters'].nil?
input = 1
else
if event['queryStringParameters']['in']
input = event['queryStringParameters']['in'].to_i
else
input = 1
end
end
triple = (input * 3).to_s
{ statusCode: 200, body: JSON.generate("Hello from Lambda! Result is " + input.to_s + " *3 = " + triple) }
end
API Gateway:
I tried to create an 'authorizer' but got the following error: