You can create a Lambda function using the AWS Management Console, AWS CLI, or AWS SDKs. Here’s a basic example using the AWS Management Console:
- Step-by-Step Guide:
- Go to the AWS Lambda console at https://console.aws.amazon.com/lambda/.
- Click on "Create function".
- Choose "Author from scratch".
- Enter a name for your function.
- Choose a runtime (e.g., Python, Node.js, Java, etc.).
- Write or paste your function code in the code editor.
- Configure your function with memory, timeout, etc.
- Optionally, set up triggers (e.g., API Gateway, S3, etc.).
- Click on "Deploy" or "Save" to create your function.