I am working with a NodeJS Lambda function and when I invoke it I get this as the result:
{
"body": "{\"message\":\"Hello from Lambda!\"}"
}
It seems as if the response is not being parsed correctly, because according to what I've seen the response should just be the hello world string. This is the code I have with the function.
exports.handler = async (event) => {
// TODO implement
const response = {
body: JSON.stringify({
message: "Hello from Lambda!",
}),
};
return response;
};
Which is the default code AWS gives you when creating a function. Does anyone know what might be the issue here?