Reputation:
I am a complete beginner to serverless computing and in general to AWS.
I have create an API using API Gateway service provided by AWS and integrated it with a Lambda function. This is the lambda function code:
exports.handler = (event, context, callback) => {
callback(null, {message: 'Hello this is a test message'})
};
Now when I test the API on AWS console, I am expecting the message that I sent from Lambda but instead I get this.
{
"statusCode": 200,
"body": "\"Hello from Lambda!\""
}
Upvotes: 0
Views: 655
Reputation: 221
You need to deploy your lambda function clicking the Deploy button. It seems as it's loading the default one.
Upvotes: 2