Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Lambda processing POST request body from API Gateway.
# aws_lambda/demo/post.py
def lambda_handler(event, context):
if event.get('httpMethod') == 'POST':
body = event.get('body')
return {
'statusCode': 200,
'body': f'Received: {body}'
}
return {
'statusCode': 405,
'body': 'Method Not Allowed'
}AWS Lambda is a serverless compute service that lets developers run code without provisioning or managing servers, automatically scaling with incoming requests.
Origin & Creator
AWS Lambda was launched by Amazon Web Services in 2014 as one of the first mainstream serverless computing platforms.
Industrial Note
AWS Lambda is highly suited for event-driven applications in the AWS ecosystem, enabling developers to focus on business logic rather than infrastructure.