虽然我可以通过调用该函数按原样运行https://github.com/mbsambangi/aws-java-spring-cloud-function-demo,但是当我在serverless.yml中引入一个http事件时,它却无法正常工作。
修改后的serverless.yml文件在下面
service: sls-aws-java-spring-cloud-function-demo
provider:
name: aws
runtime: java8
timeout: 10
package:
artifact: target/aws-java-spring-cloud-function-demo-0.0.1-SNAPSHOT-aws.jar
functions:
members:
handler: com.healthfirst.memberfunction.AwsLambdaHandler
environment:
FUNCTION_NAME: members
events:
- http:
path: /
method: POST
其他功能也正在发生这种情况。我是否缺少某些东西或是一个错误?
错误
curl -X POST https://xxxxxxxx.execute-api.yyyyyy.amazonaws.com/dev/ -H "Content-type:application/json" --data '{"memberId":"1234567890"}'
{"message": "Internal server error"}