IAM: View service last accessed information for an Organizations policy - AWS Identity and Access Management

IAM: View service last accessed information for an Organizations policy

This example shows how you might create an identity-based policy that allows viewing service last accessed information for a specific Organizations policy. This policy allows retrieving data for the service control policy (SCP) with the p-policy123 ID. The person who generates and views the report must be authenticated using AWS Organizations management account credentials. This policy allows the requester to retrieve the data for any Organizations entity in their organization. This policy defines permissions for programmatic and console access. To use this policy, replace the italicized placeholder text in the example policy with your own information. Then, follow the directions in create a policy or edit a policy.

For important information about last accessed information, including permissions required, troubleshooting, and supported Regions, see Refine permissions in AWS using last accessed information.

{ "Version": "2012-10-17", "Statement": [ { "Sid": "AllowOrgsReadOnlyAndIamGetReport", "Effect": "Allow", "Action": [ "iam:GetOrganizationsAccessReport", "organizations:Describe*", "organizations:List*" ], "Resource": "*" }, { "Sid": "AllowGenerateReportOnlyForThePolicy", "Effect": "Allow", "Action": "iam:GenerateOrganizationsAccessReport", "Resource": "*", "Condition": { "StringEquals": {"iam:OrganizationsPolicyId": "p-policy123"} } } ] }