Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
246 views
in Technique[技术] by (71.8m points)

amazon iam - Full access to one Lambda function

I don't use AWS a lot, but I wrote one small lambda function and I want to give someone full access. Everytime I try to add the user the IAM permissions it never seems to give enough access or show even the correct function. I feel like this should be a simple task. One function, with logs and SNS. Can someone help with the JSON permission needed to access this specific resource?

question from:https://stackoverflow.com/questions/65833697/full-access-to-one-lambda-function

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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:

  1. 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

  2. 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:

enter image description here

and either attach that role to your existing lambda or create a new one with it.

That should help :)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...