Generating the account status report for EC2 policies
The account status report allows you to review the current status of all attributes supported by EC2 policies for the accounts in scope. You can choose the accounts and organizational units (OUs) to include in the report scope, or choose an entire organization by selecting the root.
This report helps you assess readiness by providing a Region breakdown and if the current
state of an attribute is uniform across accounts (through the
numberOfMatchedAccounts) or inconsistent (through the
numberOfUnmatchedAccounts). You can also see the most frequent
value, which is the configuration value that is most frequently observed for
the attribute.
Whether to attach an EC2 policy for enforcing a baseline configuration depends on your specific use case.
For more information and an illustrative example, see Account status report for EC2 policies.
Prerequisites
Before you can generate an account status report, complete the following steps:
-
The
StartDeclarativePoliciesReportoperation can only be called by the management account or delegated administrators for an organization. -
To run reports from a delegated administrator account, the account must be registered as a delegated administrator for the EC2 service.
-
You must have an S3 bucket before you generate the report. Create a new bucket or use an existing one. The bucket must be in the same Region where you make the request. The bucket must have an appropriate bucket policy. For a sample S3 policy, see Sample Amazon S3 policy under Examples in the Amazon EC2 API Reference
-
You must enable trusted access for Amazon EC2. This creates a read-only service-linked role that generates the account status report of the existing configuration for accounts across your organization.
Using the console
For the Organizations console, this step is a part of the process for enabling EC2 policies.
Using the AWS CLI
For the AWS CLI, use the EnableAWSServiceAccess operation.
For more information about how to enable trusted access for a specific service with the AWS CLI, see AWS services that you can use with AWS Organizations.
-
Only one report per organization can be generated at a time. If you generate a report while another is in progress, the operation returns an error.
Generating the compliance status report
Minimum permissions
To generate a compliance status report, you need permission to run the following operations:
-
ec2:StartDeclarativePoliciesReport -
ec2:DescribeDeclarativePoliciesReports -
ec2:GetDeclarativePoliciesReportSummary -
ec2:CancelDeclarativePoliciesReport -
organizations:DescribeAccount -
organizations:DescribeOrganization -
organizations:DescribeOrganizationalUnit -
organizations:ListAccounts -
organizations:ListDelegatedAdministrators -
organizations:ListAWSServiceAccessForOrganization -
s3:PutObject
Note
If your Amazon S3 bucket uses SSE-KMS encryption, you must also include the
kms:GenerateDataKey permission in the policy.