Prerequisites for configuring Amazon EC2 instance
This section describes the prerequisites that you must perform before you configure an AWS instance. The following topics are provided:
Creating a monitor policy and a user for the monitoring account
Perform these steps in one of the following conditions:
- You want to monitor an AWS account
- You want to monitor all the trusting accounts by using the trusted accounts. Perform these steps for the main, trusted account
- You want to monitor all member accounts in the organization by using management account
These steps need to be performed on the account that you are monitoring or the trusted or management account.
If you want to monitor an AWS, create a user with read-only access.
- Log on to the Amazon Web Services with valid user credentials.
- Select Policies > Create policy.
Click the JSON tab and enter the following JSON example:
JSON example{
"Version": "yyyy-mm-dd",
"Statement": [
{
"Sid": "Statement Id",
"Effect": "Allow",
"Action": [
"Service1:Permission1",
"Service2:Permission2"
],
"Resource": [
"*"
]
}
]
}JSON that you enter is validated and errors are displayed, if any.
Click Next: Tags.
For more information, see Creating a new policy- (Optional) Add tags (key–value pairs) that you can add to AWS resources to help identify, organize, or search for resources.
- Click Next: Review.
- Enter a name and description for the policy.
For example, aws-monitor-policy. - Review the policy details and click Create Policy.
- To create a user to use for monitoring, perform the following actions:
- Go to Users > Add Users.
- In the User name field, enter the user name for the main user.
For example, aws-monitor-user. - Under Select AWS access type, select Programmatic access.
- Click Next: Permissions.
- Select Attach existing policies directly.
- In the Filter box, search for the policy that you created in the previous step (aws-monitor-policy) and select it.
- Click Next: Tags and then click Next: Review.
- Click Create User.
The policy (aws-monitor-policy) is associated with the newly created IAM user (aws-monitor-user). Note down the access key ID and the secret access key.
You need to provide these details while configuring the policy to monitor your AWS environment.
(Applicable to multi-account monitoring) If you plan to monitor multiple accounts and associate these accounts with a main account for monitoring, note the account ID of the main account by performing the following steps:
- In the AWS Management Console header, click the account name and select My Account.
- Note the Account Id from the Account Settings page.
You need to provide the account ID of the main account while configuring multiple Amazon Web Services accounts and to associate them with the main account.
- In the AWS Management Console header, click the account name and select My Account.
Monitoring multiple AWS accounts
You can monitor multiple accounts by using a single account that is considered as the trusted or management account (in case of AWS organization). The trusted or management account is responsible for retrieving data from other accounts.
Step | Where to perform | Action | Details |
---|---|---|---|
1 | Additional, trusting or member accounts | Configure a policy to specify permissions |
|
2 | Additional, trusting or member accounts | Create a cross account role |
|
3 | Main, trusted and management account | Associate the primary account with additional, trusting accounts. | Perform one of the following actions to include the additional account details in the main account.
|
In a firewall or a proxy-enabled environment, the following AWS services endpoints must be allowed:
- http://monitoring.<region>.amazonaws.com/
- http://ec2.<region>.amazonaws.com/
- http://autoscaling.<region>.amazonaws.com/
- http://sts.<region>.amazonaws.com/
- http://ec2.amazonaws.com/
- http://iam.amazonaws.com/
where <region> is one of the regions in AWS. For more information about regions, see Regions and Availability Zones.