'create function' lambda permission issue

0

Hi, I'm just a developer at work. The company I did my internship is currently developing a startApp project. As a developer I want to create lambda functions. But for this, the access premissions it gave me not enough and he doesn't know which premissions he should give. What access permissions do we need exactly?

I have already these permissions :

AWSLambda_FullAccess AWSXRayDaemonWriteAccess AWSLambdaExecute AWSLambdaSQSQueueExecutionRole AWSLambdaKinesisExecutionRole AWSLambdaBasicExecutionRole AWSLambdaInvocation-DynamoDB AWSLambdaRole

This is the warn: "User: arn:aws:iam::325845585854:user/Murat is not authorized to perform: iam:CreateRole on resource: arn:aws:iam::325845585854:role/service-role/example-role-m4gdfidg because no identity-based policy allows the iam:CreateRole action"

Enter image description here

1개 답변
1

When you create a function, by default Lambda will automatically create an IAM execution role for the function. To do that, your IAM user will require the iam:CreateRole permission, which it looks like it doesn't currently. To do this, they could create a new policy that includes that permission and attach it to your IAM user. https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_delegate-permissions_examples.html

It's important to bear in mind when granting permissions to IAM that some of these could allow a user with restricted permissions to escalate their privileges - for example, by allowing them to add additional permissions to their IAM user, or by creating and assuming a more privileged role.

Alternatively, if an appropriate Lambda service role already exists in the account, or could be created by another user, you can expand the Change default execution role section and select it, instead of creating a new role.

Ed
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠