mirror of
https://github.com/serverless/serverless.git
synced 2025-12-08 19:46:03 +00:00
26 lines
558 B
Python
26 lines
558 B
Python
import json
|
|
|
|
def hello(event, context):
|
|
return {
|
|
"message": "Go Serverless v1.0! Your function executed successfully!",
|
|
"event": event
|
|
}
|
|
|
|
# Use this code if you're using the HTTP LAMBDA-PROXY integration
|
|
"""
|
|
body = {
|
|
"message": "Go Serverless v1.0! Your function executed successfully!",
|
|
"input": event
|
|
}
|
|
|
|
response = {
|
|
"statusCode": 200,
|
|
"headers": {
|
|
"custom-header": "Custom header value"
|
|
},
|
|
"body": json.dumps(body)
|
|
};
|
|
|
|
return response
|
|
"""
|