- 최신
- 최다 투표
- 가장 많은 댓글
Hello.
I don't think configuring an IAM role is necessary for "sam build".
I think the IAM role is required for resource deployment using "sam deploy".
https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/using-sam-cli-build.html
But still failing due lack of permissions on lambda and iam
There is any managed AWS policy that I can use to setup my IAM role?
Deployment with SAM requires permission to execute CloudFormation and permission to create AWS resources listed in template.yml.
So, I don't think there is an AWS managed policy that is just what You need.
If you can accept a policy with a wide range of privileges, why not set PowerUserAccess and iam:PassRole,iam:CreatePolicy,iam:CreateRole,iam:PutRolePolicy,iam:UpdateRole?
https://docs.aws.amazon.com/aws-managed-policy/latest/reference/PowerUserAccess.html
https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_examples_iam-passrole-service.html
https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsidentityandaccessmanagementiam.html
Alternatively, I think a countermeasure would be to steadily test permissions using a policy simulator or the like.
https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_testing-policies.html
관련 콘텐츠
- AWS 공식업데이트됨 3년 전
- AWS 공식업데이트됨 10달 전
Oppps sorry, i'm executing "sam deploy"
For "sam deploy", an IAM policy is required to create the resources listed in template.yml. I think it's best to use the FullAccess policy to create each resource or create a custom policy.