1.新建lamda function,选择python,使用代码如下,之后save,然后action下拉框依次执行publish和alias
import json
print('---Loading function---')
def lambda_handler(event, context):
# print("Received event: " + json.dumps(event, indent=2))
return {
"statusCode": 200,
"body": json.dumps({
'message': 'Your code is working!'
})
}
2. 创建一个新的API Gateway
3.