Local development
mkdir project
cd project
vim lambda_function.py
import json
def lambda_handler(event, context):
return {
'statusCode': 200,
'headers': { 'Content-Type': 'application/json' },
'body': json.dumps({ 'message': 'Hello from a zip file' })
}
zip ../project.zip *
- Upload a .ZIP file.
- Save.
- Try it using
curl
.