Hey everyone! I'm new to AWS and diving into Lambda for a project I'm working on. I set up a function with a Java handler, defined as 'handleRequest(RequestEvent requestEvent, Context context)', and I've been testing it on the AWS portal using some simple JSON input, which works perfectly. Now, I'm looking to expose my Lambda function as an API, so I can send GET/POST requests through Postman. I've created a REST API Gateway and configured it to trigger my Lambda for any HTTP request, but unfortunately, I'm getting a server internal error each time I try. I realize I might not have provided enough context here, but I'm really looking for any tips or examples to help me along since I'm still learning the ropes. Thanks!
2 Answers
You might want to check out this guide: https://serverlessland.com/patterns/apigw-lambda-sls. It walks you through setting up Lambda with API Gateway using Serverless Framework and can give you a clear example.
Consider using Infrastructure as Code (IaC) tools like AWS CDK for deploying your Lambda. It really helps in managing your Lambda functions effectively!
Totally agree! IaC is a game changer for managing your AWS resources. It's much more organized and scalable.