Skip to content

Instantly share code, notes, and snippets.

@toniblyx
Last active December 24, 2021 22:54
Show Gist options
  • Save toniblyx/051d29dc40922c008ae7 to your computer and use it in GitHub Desktop.
Save toniblyx/051d29dc40922c008ae7 to your computer and use it in GitHub Desktop.

Revisions

  1. toniblyx revised this gist Jun 8, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions aimpolicy.json
    Original file line number Diff line number Diff line change
    @@ -34,8 +34,8 @@
    "rds:RestoreDBInstanceToPointInTime"
    ],
    "Resource": [
    "arn:aws:rds:us-east-1:550865318375:*",
    "arn:aws:rds:eu-west-1:550865318375:*"
    "arn:aws:rds:us-east-1:<ACCOUND-ID>:*",
    "arn:aws:rds:eu-west-1:<ACCOUND-ID>:*"
    ]
    }, {
    "Action": "vpc:*",
  2. toniblyx revised this gist Jun 8, 2016. 1 changed file with 19 additions and 2 deletions.
    21 changes: 19 additions & 2 deletions aimpolicy.json
    Original file line number Diff line number Diff line change
    @@ -17,9 +17,26 @@
    "Effect": "Allow",
    "Resource": "*"
    }, {
    "Action": "rds:*",
    "Effect": "Allow",
    "Resource": "*",
    "Action": [
    "rds:AddTagsToResource",
    "rds:Create*",
    "rds:Copy*",
    "rds:DeleteDBInstance",
    "rds:RebootDBInstance",
    "rds:DownloadDBLogFilePortion",
    "rds:ListTagsForResources",
    "rds:ModifyDBInstance",
    "rds:PromoteReadReplica",
    "rds:RemoveTagsFromResource",
    "rds:RestoreDBInstanceFromDBSnapshot",
    "rds:DownloadDBLogFilePortion",
    "rds:RestoreDBInstanceToPointInTime"
    ],
    "Resource": [
    "arn:aws:rds:us-east-1:550865318375:*",
    "arn:aws:rds:eu-west-1:550865318375:*"
    ]
    }, {
    "Action": "vpc:*",
    "Effect": "Allow",
  3. toniblyx revised this gist Jun 8, 2016. 1 changed file with 0 additions and 8 deletions.
    8 changes: 0 additions & 8 deletions aimpolicy.json
    Original file line number Diff line number Diff line change
    @@ -20,14 +20,6 @@
    "Action": "rds:*",
    "Effect": "Allow",
    "Resource": "*",
    "Condition": {
    "StringEquals": {
    "ec2:Region": [
    "us-east-1",
    "eu-west-1"
    ]
    }
    }
    }, {
    "Action": "vpc:*",
    "Effect": "Allow",
  4. toniblyx created this gist Mar 24, 2016.
    98 changes: 98 additions & 0 deletions aimpolicy.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,98 @@
    {
    "Version": "2012-10-17",
    "Statement": [{
    "Action": "ec2:*",
    "Effect": "Allow",
    "Resource": "*",
    "Condition": {
    "StringEquals": {
    "ec2:Region": [
    "us-east-1",
    "eu-west-1"
    ]
    }
    }
    }, {
    "Action": "s3:*",
    "Effect": "Allow",
    "Resource": "*"
    }, {
    "Action": "rds:*",
    "Effect": "Allow",
    "Resource": "*",
    "Condition": {
    "StringEquals": {
    "ec2:Region": [
    "us-east-1",
    "eu-west-1"
    ]
    }
    }
    }, {
    "Action": "vpc:*",
    "Effect": "Allow",
    "Resource": "*",
    "Condition": {
    "StringEquals": {
    "ec2:Region": [
    "us-east-1",
    "eu-west-1"
    ]
    }
    }
    }, {
    "Action": "cloudformation:*",
    "Effect": "Allow",
    "Resource": "*",
    "Condition": {
    "StringEquals": {
    "ec2:Region": [
    "us-east-1",
    "eu-west-1"
    ]
    }
    }
    }, {
    "Sid": "OnlyAllowCertainInstanceTypesToBeCreated",
    "Effect": "Deny",
    "Action": [
    "ec2:RunInstances"
    ],
    "Resource": "*",
    "Condition": {
    "StringEquals": {
    "ec2:InstanceType": [
    "m2.xlarge",
    "cg1.4xlarge",
    "c3.4xlarge",
    "c4.4xlarge",
    "d2.xlarge",
    "i2.xlarge",
    "m3.2xlarge",
    "r3.xlarge",
    "m4.2xlarge",
    "m2.2xlarge",
    "c3.8xlarge",
    "c4.8xlarge",
    "cc2.8xlarge",
    "g2.8xlarge",
    "hi1.4xlarge",
    "d2.2xlarge",
    "i2.2xlarge",
    "r3.2xlarge",
    "m4.4xlarge",
    "m2.4xlarge",
    "hs1.8xlarge",
    "d2.4xlarge",
    "i2.4xlarge",
    "r3.4xlarge",
    "m4.10xlarge",
    "cr1.8xlarge",
    "d2.8xlarge",
    "i2.8xlarge",
    "r3.8xlarge"
    ]
    }
    }
    }]
    }