AWS Quick Start Guide
About
SevOne's AWS plugin allows you to collect devices, metadata, and metrics from the AWS environment right out-of-the-box. The plugin makes use of AWS CloudWatch metric streams for overtime data as well as for API calls for metadata enrichment. The AWS plugin allows you to monitor multiple different AWS accounts and regions.
Device Creation
SevOne NMS is configured, by default, to regularly call AWS APIs to retrieve information about the devices and then, automatically create devices for each AWS resource.
Configure Web Proxy for AWS Plugin
Required Infrastructure in AWS
- IAM Users
- IAM Collector Role
- SQS Queue
- Metric Stream
- Firehose
- S3 Bucket
- Terraform (recommended) - for details, please continue to section AWS User Setup.
- AWS management console - for details, please refer to section Appendix B: Deploy AWS Resources using AWS Console for Metrics to learn how to setup via AWS management console.
AWS User Setup
To maintain a least privilege posture when setting up the required infrastructure in AWS and running the collector, the following is recommended.
- Infrastructure User - user deploying the infrastructure.
- Collector User - user used by the collector.
Infrastructure User Setup
Create a new IAM Policy with the following permissions.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "StatementIAM",
"Effect": "Allow",
"Action": [
"iam:GetRole",
"iam:UpdateAssumeRolePolicy",
"iam:ListAttachedRolePolicies",
"iam:CreateRole",
"iam:ListRolePolicies",
"iam:GetRolePolicy",
"iam:PutRolePolicy",
"ec2:DescribeRegions"
],
"Resource":[
"*"
]
}
]
}
Create a new user and attach it with the IAM Policy created above.
Collector User Setup
Create a second new IAM User. There is no need to attach a policy to this user.
The collector user simply needs to exist and can have an empty permissions set. It will assume a role with the required permissions created by Terraform in the step below.
Access Key Credentials
For the sections in this guide below, you will need to create an Access Key credential for the Collector User and retain its Access Key ID and Secret Key. It is important to copy the Secret Key immediately after creating the credential, as it will be permanently hidden when the page is left.
An Access Key credential is also required for the Infrastructure User if deploying infrastructure with Terraform. In that case, you will need the Access Key ID and Secret Key for this credential.
PrivateLinks Infrastructure Setup (optional)
General
PrivateLink support enables secure and confidential collection of AWS resources, including their metadata and performance metrics, ensuring end-to-end data privacy. This feature ensures that all transmitted and stored information remains fully isolated and protected from unauthorized access, upholding the highest standards of data security.
- EC2 Instance
- Transit Gateway
- NAT Gateway
- VPN
- S3
- EBS Volume
- Elastic Load Balancer
- Lambda
Prerequisites
Configure PrivateLinks
Once the common infrastructure for the AWS Collector is set, please refer to Get started with AWS PrivateLink on how to create VPCs, subnets, route tables, endpoints and how to link them to the AWS services, etc.
To create VPC Transit Gateways (TGWs), please refer to Create a transit gateway using Amazon VPC Transit Gateways.
To create TGW peering, please refer to Create a peering attachment using Amazon VPC Transit Gateways.
You are now ready to enable PrivateLinks.
Enable PrivateLinks
The PrivateLink functionality is optional and can be enabled by following the steps below.
- Using a text editor of your choice, create a .yaml file, privatelinks.yaml in /config/aws/ directory.
- Populate the file with the required VPC endpoints created during the AWS PrivateLink setup.
- A reference file, sample-privatelinks.yaml, is available in the /config/aws/ directory. You can either copy its contents into the newly created privatelinks.yaml or rename the sample file.
- Be sure to update the file with the specific endpoints from your PrivateLink setup (as
described in Get started with AWS PrivateLink). For example,
vpce-1234-q018afg2.ec2.ap-south-1.vpce.amazonaws.comPrivateLinks: <region>: <service>: "<vpc-endpoint-id>.<service>.<region>.vpce.amazonaws.com"Note:- region must have the corresponding AWS region. For example, us-east-1, ap-south-1
- service must have the service name in lower-case. For example, ec2, s3, sts, sqs, monitoring, lambda, elb
ExamplePrivateLinks: us-east-1: ec2: "vpce-1234-a7gqwuts.ec2.us-east-1.vpce.amazonaws.com" s3: "bucket.vpce-1234-om0crbbo.s3.us-east-1.vpce.amazonaws.com" sts: "vpce-1234-gmundb4e.sts.us-east-1.vpce.amazonaws.com" sqs: "vpce-1234-hlttexco.sqs.us-east-1.vpce.amazonaws.com" monitoring: "vpce-1234-wxr1dmyd.monitoring.us-east-1.vpce.amazonaws.com" lambda: "vpce-1234-gtcni32g.lambda.us-east-1.vpce.amazonaws.com" elb: "vpce-1234-0cf1ouw3.elasticloadbalancing.us-east-1.vpce.amazonaws.com" ap-south-1: ec2: "vpce-1234-q018afg2.ec2.ap-south-1.vpce.amazonaws.com" s3: "bucket.vpce-1234-ek2cskah.s3.ap-south-1.vpce.amazonaws.com" sts: "vpce-1234-tw6l6wt3.sts.ap-south-1.vpce.amazonaws.com" sqs: "vpce-1234-2am90mcd.sqs.ap-south-1.vpce.amazonaws.com" monitoring: "vpce-1234-a3mvdnjm.monitoring.ap-south-1.vpce.amazonaws.com" lambda: "vpce-1234-3ok7x7sk.lambda.ap-south-1.vpce.amazonaws.com" elb: "vpce-1234-juyb8526.elasticloadbalancing.ap-south-1.vpce.amazonaws.com"Note:- ec2 service endpoint is necessary to collect EC2 instances, EBS volumes, Transit gateway, NAT gateway, and VPN devices.
- elb and lambda service endpoints are required to collect ELB and lambda devices respectively.
- s3 service endpoint is necessary to collect S3 devices and metrics, it is essential to replace * with bucket keyword in the service name. For example, *.vpce-1234-om0crbbo.s3.us-east-1.vpce.amazonaws.com must be replaced with bucket.vpce-1234-om0crbbo.s3.us-east-1.vpce.amazonaws.com.
- sts service endpoint is necessary for validating credentials.
- sqs and monitoring (CloudWatch) service endpoints are essential for metric collection.
- The privatelinks.yaml file must be placed in the NMS appliance configuration directory, /config/aws/.
- Restart the AWS Collector service on the NMS appliance to apply the configuration.
Note: PrivateLinks must be enabled only for private (air-gapped) environments.
Troubleshoot PrivateLinks
The following are a few common scenarios in AWS container console that may arise when configuring the PrivateLinks.
Issue# 1:
{"level":"info","ts":1749817617.106396,"msg":"Warning: ec2 vpc endpoint not found in configuration for region ap-southeast-1"}
The collector is unable to locate the VPC endpoint information, which may be due to a missing or misconfigured privatelinks.yaml file.
- Ensure that the privatelinks.yaml file exists in the expected directory, /config/aws/.
- Verify that it contains accurate endpoint configurations for all relevant regions.
- Additionally, validate the file’s syntax and confirm that all required keys and corresponding values are correctly defined.
Issue# 2
{"level":"error","ts":1749794399.442174,"msg":"failed to Authenticate with \
AWS","error":"failed to assume role arn:aws:iam::012345678901:role/sevone-auto_collector_role: \
operation error STS: GetCallerIdentity, get identity: get credentials: failed to refresh cached credentials, \
operation error STS: AssumeRole, exceeded maximum number of attempts, 3, \
https response error StatusCode: 0, RequestID: , request send failed, \
Post \"https://vpce-1234-gmundb4e.sts.us-east-1.vpce.amazonaws.com/\": dial tcp 67.220.240.253:443: i/o timeout"}
This issue may be caused by insufficient Layer 3 connectivity between VPCs across regions. The system is attempting to access the VPC endpoint at https://vpce-1234-gmundb4e.sts.us-east-1.vpce.amazonaws.com.
- Ensure that the Transit Gateway (TGW) is properly configured between the source and destination VPCs.
- Verify that the route tables in both VPCs are correctly set up to enable communication.
- Additionally, confirm that the VPC network ACLs allow HTTPS traffic on port 443 for all inbound and outbound traffic.
Issue# 3
{"level":"error","ts":1749794306.1431816,"msg":"failed to Authenticate \
with AWS","error":"failed to assume role arn:aws:iam::012345678901:role/sevone-auto_collector_role: \
operation error STS: GetCallerIdentity, get identity: get credentials: failed to refresh cached \
credentials, operation error STS: AssumeRole, exceeded maximum number of attempts, 3, \
https response error StatusCode: 0, RequestID: , request send failed, \
Post \"https://sts.ap-south-1.amazonaws.com/\": dial tcp 13.200.92.183:443: i/o timeout"}
This issue may be due to PrivateLink not being properly enabled. The system is attempting to access the public DNS endpoint, https://sts.ap-south-1.amazonaws.com.
- Confirm that the privatelinks.yaml file is located in the correct directory, /config/aws/.
- Review its contents to ensure that all VPC endpoint services and region mappings are accurately defined.
Deploy with Terraform
Terraform is the recommended way to configure the AWS resources. This allows for the quickest startup time while ensuring that resources are configured exactly as intended. To deploy and configure the required resources, a set of Terraform files can be found in /config/aws/terraform directory. In order to run the Terraform files to create the resources, a role has been defined to maintain a least privileged posture. Let's refer to this role as Infrastructure Role.
Create an Infrastructure Role for Terraform to use
- Terraform (recommended) – for details, continue on with this section.
- AWS management console – for details, please refer to Appendix D: Create an Infrastructure Role via AWS Console for Terraform to use
Create Infrastructure Role for Terraform
- Using ssh, log in to SevOne NMS appliance as support user.
ssh support@<NMS appliance> - Open a shell within the NMS container.
nms - Change directory to /config/aws/terraform/envs/infrastructure_role.
- Update the following values in terraform.tfvars. Important: Variable prefix must be,
- between 1 and 20 characters
- contain only lowercase letters, digits, or hyphens
- start and end with letters or digits
account_id = <YOUR AWS ACCOUNT NUMBER> prefix = <PREFIX TO UNIQUELY IDENTIFY RESOURCES>Empty 'terraform.tfvars' file published with examples in comments
## Your 12 digit AWS account number # account_id = <enter your AWS account number> ## Prefix to uniquely identify resources that are created in AWS ## - Must be all lowercase due to S3 bucket naming restrictions # prefix = "<enter a unique identifier>"Example
## Your 12 digit AWS account number account_id = 012345678901 ## Prefix to uniquely identify resources that are created in AWS ## - Must be all lowercase due to S3 bucket naming restrictions prefix = "myprefix" - Set the following environment variables with Access Key ID and Secret Key for the Infrastructure
User that was created in section Access Key
Credentials. For more information about creating access keys for IAM users, please refer
to https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html
export AWS_ACCESS_KEY_ID="mykey" export AWS_SECRET_ACCESS_KEY="mysecret" export AWS_REGION="us-east-1" - Apply the Terraform files.
terraform init terraform plan terraform applyImportant: Please make note of output value, infrastructure_role_arn, as it will be required in section Run Terraform to deploy AWS resources below.
Run Terraform to deploy AWS resources
- Change directory to /config/aws/terraform/envs/collector_infrastructure.
cd /config/aws/terraform/envs/collector_infrastructure - Update the following values in terraform.tfvars.
Empty 'terraform.tfvars' file published with examples in comments
## Your 12 digit AWS account number # account_id = 012345678901 ## AWS IAM User ARN that will be used to run the collector # collector_user_arn = "arn:aws:iam::012345678901:user/person@company.com" ## AWS IAM Role ARN that will be used to install infrastructure ## - This can be found in the output of applying the `infrastructure_role` Terraform config # infrastructure_role_arn = "arn:aws:iam::012345678901:role/sevone_infrastructure_role" ## List of regions that you want to monitor # regions = ["us-east-1", "us-west-1"] ## Prefix to uniquely identify resources that are created in AWS ## - Must be all lowercase due to S3 bucket naming restrictions # prefix = "sevone"Important: Variable prefix must be the same prefix that was used when creating the Infrastructure Role.Important: Resources must be created in every region that you want to monitor. When adding more than one region to create the resources in, you can add it in terraform.tfvars file as,Example
regions = ["us-east-1", "eu-central-1"] - Apply the Terraform files.
cd gen terraform init terraform plan terraform apply cd .. terraform init terraform plan terraform apply - Details from the following output will be required to create a device in SevOne NMS.
- account_id
- collector_role_arn
- sqs_queue
- regions
Enable AWS Plugin
Execute the following steps to monitor an AWS account. This will automatically create devices and collect metrics for various AWS resources within selected regions for that account.
- To access the Device Manager from the navigation bar, click the Devices menu and select Device Manager.
- Either add a device with the AWS plugin or edit an existing device to enable the AWS plugin.
- Click Add Device to display the New Device page.
- Click the wrench icon under the Actions column to display the Edit Device page.
- Click the plugin drop-down. By default, it is set to SNMP. Select AWS.
- Select the Enable AWS Integration check box.
- In the Account ID field, enter the ID of the account you want to monitor and collect data from.
- In the Access Key ID field, enter the Access Key ID previously created in Access Key Credentials for the Collector User.
- In the Secret Access Key field, enter the Secret Key previously created in Access Key Credentials for the Collector User.
- In the SQS Queue field, enter the SQS Queue name that the collector will listen to for metric stream events. For additional details, please refer to section Required Infrastructure in AWS.
- In the Collector Role ARN field, enter the ARN of the IAM role that the collector will assume. For additional details, please refer to section Required Infrastructure in AWS.
- Select / deselect the column headers or AWS region codes you want to collect data from.
- Select or deselect a column header (for example, North America) to enable or disable collection for all regions underneath that header.
- Select or deselect an AWS region code (for example, us-east-1) to enable or disable collection for that region.
- Click Save As New to save the current changes as a New Device, or click Save to confirm the changes in the Edit Device page.
- When the desired changes have been saved, click the Cancel button to return to the
Device Manager page. Important: Once the device is created, collection of AWS resources starts on SevOne NMS.
OOTB Reports
The following out-of-the-box (OOTB) reports are available as part of SevOne Data Insight 6.5 and above.
- AWS Direct Connect - report showing AWS Direct Connect inventory and network performance.
- AWS EBS Volumes - report showing AWS EBS Volume performance.
- AWS EC2 Report - report showing AWS EC2 inventory, CPU, disk, and network performance.
- AWS NAT Gateway - report showing AWS NAT Gateway inventory, throughput and connection statistics.
- AWS Network Load Balancers - report showing AWS Network Load Balancer statistics.
- AWS S3 Report - report showing AWS S3 inventory and bucket statistics.
- AWS Site to Site VPN - report showing AWS Site to Site VPN metrics.
- AWS Transit Gateways - report showing AWS Transit Gateway inventory, network traffic, and drops.
- AWS Lambda - report showing AWS Lambda invocation, asynchronous invocation, concurrency, and performance.
- AWS Route 53 - report showing AWS Route 53 Health Check statistics and AWS Route 53 Resolver statistics.
Update AWS Infrastructure
SevOne NMS v7.1.0 supports more AWS resources for monitoring than v7.0.0 and consolidates the required AWS permissions to maintain a least-privilege posture. For this reason, if upgrading from SevOne NMS 7.0.0 or a prior version to SevOne NMS 7.1.0 or above, you are required to reapply Terraform to update the collector’s infrastructure.
Destroy Previously Created AWS Resources
- Using ssh, log in to SevOne NMS appliance as support user.
ssh support@<NMS appliance> - Open a shell within the NMS container.
nms - Change directory to /config/aws/terraform/envs/collector_infrastructure.
cd /config/aws/terraform/envs/collector_infrastructure - Ensure providers are installed before destroying.
terraform init - Destroy the Terraform state.
terraform destroy
Update Infrastructure Role
- If not already, use ssh to log in to SevOne NMS appliance as support user and
open a shell within the NMS container.
ssh support@<NMS appliance> nms - Change directory to /config/aws/terraform/envs/infrastructure_role.
- Compare the new terraform.tfvars to the backup terraform-v7.1.0.tfvars, if it exists.
- Using a text editor of your choice, edit terraform.tfvars by uncommenting the variable assignments and setting the variables to the correct values.
- Apply the Terraform files.
terraform init terraform plan terraform apply
Run Terraform to deploy AWS resources
- Change directory to /config/aws/terraform/envs/collector_infrastructure.
- Regenerate the Terraform files.
cd gen terraform init terraform plan terraform apply cd .. - Compare the new terraform.tfvars to the backup terraform-v7.1.0.tfvars, if it exists.
- Using a text editor of your choice, edit terraform.tfvars by
uncommenting the variable assignments and setting the variables to
the correct values.
Important: Variable prefix must be the same prefix that was used for the Infrastructure Role.
- Apply the Terraform files.
terraform init terraform plan terraform apply
Appendices
TAG (optional)
Add Tags list to /config/aws/config.yaml file. Add name of the tag to be collected to the list as mentioned in the example below. Owner and Category are sample tag names.
Tags:
- "Owner"
- "Category"
Appendix A: Web Proxy Setup
If you are using Web Proxies for connecting to the AWS environment, you may need to set the web proxy. The proxy URL can be in one of the following two formats.
-
where, <user> and <password> are URL encoded strings.http://<user>:<password>@<domain name or IP address>:<port> or https://<user>:<password>@<domain name or IP address>:<port>These URLs are defined using the environment variables. For example,
HTTP_PROXY=http://user1:password@proxy.corp.com:8080 or HTTPS_PROXY=https://user1:password@proxy.corp.com:8080 -
http://<domain name or IP address>:<port> or https://<domain name or IP address>:<port>if there is no username and password associated with the proxy.
These URLs are defined using the environment variables. For example,HTTP_PROXY=http://proxy.corp.com:8080 or HTTPS_PROXY=https://proxy.corp.com:8080
As the AWS collector is running within a pod as a container, the environment variables must be set for that container. Execute the following steps.
- Using ssh, log in to SevOne NMS appliance as support user.
ssh support@<NMS appliance> - Using a text editor of your choice, edit /config/aws/.env file.
sudo vi /config/aws/.env - Add the following, for example, to the file based on your format and save the file.
HTTP_PROXY=http://user1:password@proxy.corp.com:8080 HTTPS_PROXY=https://user1:password@proxy.corp.com:8080 or HTTP_PROXY=http://proxy.corp.com:8080 HTTPS_PROXY=https://proxy.corp.com:8080 - Restart nms-collectors service.
sudo systemctl restart nms-collectors
Appendix B: Deploy AWS Resources using AWS Console for Metrics
AWS Console allows you to create the required AWS resources without the use of Terraform. While it is recommended to use Terraform, this is a viable option when that is not possible.
Create a Metric Stream
- Navigate to CloudWatch > Metric Streams.
- Click Create metric stream to launch the wizard.
- Select Select metrics.
- Select Include.
- Select the following namespaces and select Use: "AWS/<namespace> = All metrics
names" to get all metrics for the selected namespaces.
- AWS/EC2
- AWS/S3
- AWS/NATGateway
- AWS/TransitGateway
- AWS/DX
- AWS/EBS
- AWS/NetworkELB
- AWS/VPN
- AWS/Lambda
- AWS/Route53
- AWS/Route53Resolver
- Name the metric stream. Note: You will need the name of the S3 bucket within the Resources will be added to your account section for the next section.
- Click Create metric stream to complete the configuration.
Set up S3 Event Notifications
Create a Collector Role
- Policy 'aws_collector_directconnect_policy'
- Policy 'sevone_collector_cloudwatch_policy'
- Policy 'sevone_collector_ec2_policy'
- Policy 'sevone_collector_elasticloadbalancing_policy'
- Policy 'sevone_collector_s3_policy'
- Policy 'sevone_collector_sqs_policy'
- Policy 'sevone_collector_lambda_policy'
- Policy 'sevone_collector_route53_policy'
- sevone_collector_route53resolver_policy'
Policy 'aws_collector_directconnect_policy'
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Action": [
"directconnect:DescribeLocations",
"directconnect:DescribeConnections"
],
"Resource": "*"
}
]
}
Policy 'sevone_collector_cloudwatch_policy'
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Action": "cloudwatch:GetMetricData",
"Resource": "*"
}
]
}
Policy 'sevone_collector_ec2_policy'
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Action": [
"ec2:DescribeInstances",
"ec2:DescribeNatGateways",
"ec2:DescribeTransitGateways",
"ec2:DescribeVolumes",
"ec2:DescribeVolumeStatus",
"ec2:DescribeVpnConnections"
],
"Resource": "*"
}
]
}
Policy 'sevone_collector_elasticloadbalancing_policy'
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Action": [
"elasticloadbalancing:DescribeTags",
"elasticloadbalancing:DescribeLoadBalancers"
],
"Resource": "*"
}
]
}
Policy 'sevone_collector_s3_policy'
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Action": [
"s3:ListAllMyBuckets",
"s3:GetBucketTagging"
],
"Resource": "*"
},
{
"Sid": "",
"Effect": "Allow",
"Action": [
"s3:GetObject"
],
"Resource": "arn:aws:s3:::CLOUDWATCH_BUCKET_NAME*"
},
]
}
Policy 'sevone_collector_sqs_policy'
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Action": [
"sqs:ReceiveMessage",
"sqs:GetQueueUrl",
"sqs:DeleteMessage"
],
"Resource": "arn:aws:sqs:*:ACCOUNT_ID:CLOUDWATCH_SQS_QUEUE_NAME"
}
]
}
Policy 'sevone_collector_lambda_policy'
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"lambda:ListTags",
"lambda:ListFunctions"
],
"Effect":"Allow",
"Resource":"*"
}
]
}
Policy 'sevone_collector_route53_policy'
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"route53:ListTagsForResource",
"route53:ListHealthChecks"
],
"Effect":"Allow",
"Resource":"*"
}
]
}
Policy 'sevone_collector_route53resolver_policy'
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"route53resolver:ListTagsForResource",
"route53resolver:ListResolverEndPoints"
],
"Effect":"Allow",
"Resource":"*"
}
]
}
- Navigate to IAM > Roles.
- Search for the collector role that you recently created
- Click the role. Note: If you have not already copied the ARN of this role, you can do so now. You will need it to enable the AWS Plugin.
- Click the Trust Relationships tab.
- Ensure that the Collector User has permission to assume the role.
- If the Collector User does not have permission, you can add a new statement to the trust policy with the Collector User ARN like the one below by clicking the Edit trust policy button.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Principal": {
"AWS": "COLLECTOR_USER_ARN"
},
"Action": "sts:AssumeRole"
}
]
}
Once all the steps have been completed, you may Enable AWS Plugin.
Appendix C: Create an Infrastructure Role via AWS Console for Terraform to use
Create a Policy
To create a role for Terraform to use, you must first define the policy that will be added to the role.
- Navigate to IAM > Policies.
- Click the Create policy button to launch the wizard.
- Switch the Policy editor to JSON.
- Paste in the following policy definition. Important: Variable prefix must be,
- between 1 and 20 characters
- contain only lowercase letters, digits, or hyphens
- start and end with letters or digits
Note: You will need to replace the instances of PREFIX in the policy statements below with the prefix you picked out, and then replace the instances of ACCOUNT_ID with the AWS account ID for the account that the resources will be created in.{ "Version": "2012-10-17", "Statement": [ { "Action": [ "cloudwatch:TagResource", "cloudwatch:ListTagsForResource" ], "Effect": "Allow", "Resource": "arn:aws:cloudwatch:*:ACCOUNT_ID:*PREFIX*", "Sid": "" }, { "Action": [ "firehose:ListTagsForDeliveryStream", "firehose:DescribeDeliveryStream", "firehose:DeleteDeliveryStream", "firehose:CreateDeliveryStream" ], "Effect": "Allow", "Resource": "arn:aws:firehose:*:ACCOUNT_ID:deliverystream/PREFIX*", "Sid": "" }, { "Action": [ "iam:TagRole", "iam:PutRolePolicy", "iam:PassRole", "iam:ListRolePolicies", "iam:ListInstanceProfilesForRole", "iam:ListAttachedRolePolicies", "iam:GetRolePolicy", "iam:GetRole", "iam:DeleteRolePolicy", "iam:DeleteRole", "iam:CreateRole" ], "Effect": "Allow", "Resource": " arn:aws:iam::ACCOUNT_ID:role/PREFIX*", "Sid": "" }, { "Action": [ "cloudwatch:StopMetricStreams", "cloudwatch:StartMetricStreams", "cloudwatch:PutMetricStream", "cloudwatch:ListMetricStreams", "cloudwatch:GetMetricStream", "cloudwatch:DeleteMetricStream" ], "Effect": "Allow", "Resource": " arn:aws:cloudwatch:*:ACCOUNT_ID:*PREFIX*", "Sid": "" }, { "Action": [ "s3:PutObject", "s3:PutLifecycleConfiguration", "s3:PutBucketTagging", "s3:PutBucketPublicAccessBlock", "s3:PutBucketNotification", "s3:PutBucketAcl", "s3:ListBucket", "s3:ListAllMyBuckets", "s3:GetReplicationConfiguration", "s3:GetLifecycleConfiguration", "s3:GetEncryptionConfiguration", "s3:GetBucketWebsite", "s3:GetBucketVersioning", "s3:GetBucketTagging", "s3:GetBucketRequestPayment", "s3:GetBucketPublicAccessBlock", "s3:GetBucketPolicyStatus", "s3:GetBucketPolicy", "s3:GetBucketObjectLockConfiguration", "s3:GetBucketNotification", "s3:GetBucketLogging", "s3:GetBucketLocation", "s3:GetBucketCORS", "s3:GetBucketAcl", "s3:GetAccelerateConfiguration", "s3:DeleteBucket", "s3:CreateBucket" ], "Effect": "Allow", "Resource": "arn:aws:s3:::*PREFIX*", "Sid": "" }, { "Action": [ "sqs:TagQueue", "sqs:SetQueueAttributes", "sqs:ListQueues", "sqs:ListQueueTags", "sqs:GetQueueUrl", "sqs:GetQueueAttributes", "sqs:DeleteQueue", "sqs:CreateQueue" ], "Effect": "Allow", "Resource": "arn:aws:sqs:*:ACCOUNT_ID:*PREFIX*", "Sid": "" } ] }
- Click Next.
- Under the Policy details, enter a Policy name.
- Click Create policy.
Create a Role
Once the policy has been created, you can now create the IAM role.
- Navigate to IAM > Roles.
- Click the Create role button to launch the wizard.
- Under Trusted entity type, select AWS account.
- Under An AWS account, select This account.
- Click Next.
- Under Permissions policies search for the name of the policy you created in the previous step.
- Click the check box beside the policy you created in the previous step.
- Click Next.
- Under the Role details, enter a Role name
- Click Create role.