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.

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ