{
"Version": "2012-10-17",
"Statement": [
{
// Allows managing EC2 networking components if tagged with Aviatrix-specific tag
"Action": [
"ec2:Describe*",
"ec2:Get*",
"ec2:Search*",
"elasticloadbalancing:Describe*",
"route53:List*",
"route53:Get*",
"sqs:Get*",
"sqs:List*",
"sns:List*",
"s3:List*",
"s3:Get*",
"iam:List*",
"iam:Get*",
"directconnect:Describe*",
"guardduty:Get*",
"guardduty:List*",
"ram:Get*",
"ram:List*",
"networkmanager:Get*",
"networkmanager:List*"
],
// Allows managing EC2 networking components if tagged with Aviatrix-specific tag
"Resource": "*",
"Effect": "Allow",
"Sid": "ReadOnlyDiscoveryAccess"
},
{
"Action": [
"ec2:*InternetGateway*",
"ec2:*Route*",
"ec2:*NetworkInterface*"
],
"Resource": "*",
"Condition": {
"StringEquals": {
"ec2:ResourceTag/Aviatrix-Created-Resource": "Do-Not-Delete-Aviatrix-Created-Resource"
}
},
"Effect": "Allow",
"Sid": "NetworkingComponents"
},
{
// Allows creation and deletion of EC2 security groups and ingress rules
"Sid": "EC2SecurityGroupManagement",
"Effect": "Allow",
"Action": [
"ec2:CreateSecurityGroup",
"ec2:DeleteSecurityGroup",
"ec2:AuthorizeSecurityGroupIngress"
],
"Resource": [
"arn:aws:ec2:*:*:security-group/*",
"arn:aws:ec2:*:*:vpc/*"
]
},
{
// Grants permissions to manage EC2 instances and related resources
"Action": [
"ec2:*Instance*",
"ec2:AllocateAddress",
"ec2:AssociateAddress",
"ec2:ReleaseAddress"
],
"Resource": [
"arn:aws:ec2:*:*:volume/*",
"arn:aws:ec2:*:*:instance/*",
"arn:aws:ec2:*:*:network-interface/*",
"arn:aws:ec2:*:*:subnet/*",
"arn:aws:ec2:*:*:security-group/*",
"arn:aws:ec2:*:*:key-pair/*",
"arn:aws:ec2:*:*:image/*",
"arn:aws:ec2:*:*:elastic-ip/*"
],
"Effect": "Allow",
"Sid": "EC2InstanceManagement"
},
{
// Allows launching EC2 instances with required tags
"Effect": "Allow",
"Action": "ec2:RunInstances",
"Resource": [
"arn:aws:ec2:*:*:volume/*",
"arn:aws:ec2:*:*:instance/*",
"arn:aws:ec2:*:*:network-interface/*",
"arn:aws:ec2:*:*:placement-group/*",
"arn:aws:ec2:*:*:snapshot/*",
"arn:aws:ec2:*:*:launch-template/*"
],
"Condition": {
"StringEquals": {
"ec2:CreateAction": [
"RunInstances"
]
},
"ForAllValues:StringEquals": {
"aws:TagKeys": [
"Aviatrix-Created-Resource",
"Name",
"Type"
]
}
}
},
{
// Allows tagging of AWS resources
"Action": [
"ec2:CreateTags",
"ec2:DeleteTags"
],
"Resource": "*",
"Effect": "Allow",
"Sid": "EC2TAGManagement"
},
{
// Allows creation and deletion of EC2 key pairs
"Sid": "EC2KeyPairManagement",
"Effect": "Allow",
"Action": [
"ec2:CreateKeyPair",
"ec2:DeleteKeyPair"
],
"Resource": "*"
},
{
// Allows managing CloudWatch log delivery
"Action": [
"logs:CreateLogDelivery",
"logs:DeleteLogDelivery"
],
"Resource": "*",
// Allows managing IAM roles and instance profiles prefixed with 'aviatrix-'
"Effect": "Allow"
},
{
"Action": [
"iam:PassRole",
"iam:AddRoleToInstanceProfile",
"iam:CreateInstanceProfile",
"iam:DeleteInstanceProfile",
"iam:RemoveRoleFromInstanceProfile",
"iam:CreateServiceLinkedRole",
"iam:TagInstanceProfile"
],
"Resource": [
"arn:aws:iam::*:role/aviatrix-*",
"arn:aws:iam::*:instance-profile/aviatrix-*"
],
// Allows managing IAM policy versions
"Effect": "Allow"
},
{
"Action": [
"iam:DeletePolicyVersion",
"iam:CreatePolicyVersion"
],
"Resource": "*",
// Grants read-only access to AWS CloudTrail for auditing
"Effect": "Allow"
},
{
"Action": [
"cloudtrail:Get*",
"cloudtrail:Describe*",
"cloudtrail:List*",
"cloudtrail:LookupEvents"
],
"Resource": "*",
// Grants read-only access to Amazon EKS clusters
"Effect": "Allow"
},
{
"Action": [
"eks:ListClusters",
"eks:DescribeCluster"
],
"Resource": "*",
"Effect": "Allow"
}
]
}