how can i quickly troubleshoot IAM permission for a service

1

hi.. i'm currently developing a beanstalk service that calls an automation document that creates cloudformation stacks. the role for such a service requires many MANY iterations, of modify Role, upload, restart, try again. as a developer we only have SSO roles, is there a way i can develop under the context of the service role without modifying the original role to allow my sso user to assume it? i'd like to be able to perform operations as though i am the service to figure out faster what kind of permissions i require (for example execute cloudformation stack as though i am that role

2개 답변
2

One way of generating policies is to use AWS's policy generator based off activity: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_generate-policy.html. With this, IAM Access Analyzer reviews AWS CloudTrail for API calls and generates a policy template that contains the permissions that the entity used over a specified data range.

There are other 3rd party tools that do something like this as well.

I also recommend using AWS Policy Sim: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_testing-policies.html

jsonc
답변함 2년 전
  • thanks, i've been reading about the policy generation, and i'm not sure about a few things, i'm assuming i need to use my current developer role, but OTOH , i don't want to give my actuall role, as i maybe doing other aws stuff while the activity is running, not mention my IDE will as well, so i would need to create an additional role similar to my own, by my current role is actually SAML based, so how do i create a "developer like" role i can configure in aws CLI to assume that role?

1

You can search for the service role in IAM Roles and see which policies are applied to it. Then create another role that you can assume or create an IAM user with the same policies that are applied to the server role. After you are done you can remove the role/user that you created.

AWS
답변함 2년 전
  • that's what i thought i would do, but i can't even create roles for that too.

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

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

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

관련 콘텐츠