0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

権限設定の確認

Last updated at Posted at 2020-06-21

Policy Simulatorによる確認

マネジメントコンソールログイン後、以下にアクセス。

User/Group/Roleを選択し確認。
例えばRoleなら確認したいRoleを選択し、チェック対象のPolicyを選択。
右側のPolicy Simulatorでチェックしたい対象を選択し、[Run Simulation]で
権限(allowed/denied)を確認することができる。

dry-runオプションによる実行例

権限がない場合

% aws ec2 run-instances --dry-run --image-id XXXXXXXXXXXX --instance-type t2.micro

An error occurred (UnauthorizedOperation) when calling the RunInstances operation: You are not authorized to perform this operation. Encoded authorization failure message: ...

権限がある場合

% aws ec2 run-instances --dry-run --image-id XXXXXXXXXXXX --instance-type t2.micro

An error occurred (DryRunOperation) when calling the RunInstances operation: Request would have succeeded, but DryRun flag is set.

認証メッセージのデコード

stsのdecode-authorization-messageを使用してデコードが可能。

% aws sts decode-authorization-message --encoded-message

デコード結果はjson形式となる(VSCodeとか使って適宜フォーマットして確認)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?