Create Lambda Functions in AWS
AWS Lambda runs your code in a serverless compute service in response to events and manages all compute resources.
For more information, see AWS Lambda Features.
To create Lambda functions in AWS:
- Login to your AWS account and navigate to https://console.aws.amazon.com/lambda/.
- Select Functions from LHS and then select Create Function.
- Navigate to a new window and create a lambda function.
- In the Name text box, type the name of the lambda function.
- Choose Runtime from the list. If you are writing your lambda in the Python Language, select Python 2.7 or Python 3.6
- In the Role text box, select Choose An Existing role.
- In the existing Role textbox, select the Role ARN that with the lambda permissions.
- Then, press Create Function.
- Scroll down to Function Code and select Upload .zip file from Code entry type.
- Select Upload and choose the Lambda function you want to run. Then in Handler, type python file name + dot(.)+ function name which will run when the lambda is triggered example incident_remediation_world_readable_s3.lambda_handler and then Save.
- After saving, the lambda function will appear on the AWS screen.
- Scroll down In Lambda function page to Basic Setting and increase the Timeout to 5 min.
- Save the lambda function.