A Lambda function is triggered by a so-called event source. An event source is an AWS service so you need to give the lambda function enough access to that service.
Two ways I recommend you to do it:
Go to the AWS Lambda page and create one:
Use the blueprint microservice-http-endpoint
lambda function as sample and click configure.
It will create a new permission for you as you will see in that config page
This one is just a test and should not be used in production:
Create a new Role and name it test, and attatch it this policies:
and either attach that role to your existing lambda or create a new one with it.
That should help :)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…