Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rowanu/fc111263aa4a8f98c22a6e9080de0a65 to your computer and use it in GitHub Desktop.
Save rowanu/fc111263aa4a8f98c22a6e9080de0a65 to your computer and use it in GitHub Desktop.
SCP to deny potentially expensive and/or long-running AWS IAM actions
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PotentiallyExpensiveActions",
"Effect": "Deny",
"Action": [
"acm-pca:CreateCertificateAuthority",
"aws-marketplace:AcceptAgreementApprovalRequest",
"aws-marketplace:Subscribe",
"backup:PutBackupVaultLockConfiguration",
"bedrock:CreateProvisionedModelThroughput",
"bedrock:InvokeAgent",
"bedrock:InvokeModel",
"bedrock:InvokeModelWithResponseStream",
"dynamodb:PurchaseReservedCapacityOfferings",
"ec2:ModifyReservedInstances",
"ec2:PurchaseHostReservation",
"ec2:PurchaseReservedInstancesOffering",
"ec2:PurchaseScheduledInstances",
"elasticache:PurchaseReservedCacheNodesOffering",
"es:PurchaseReservedElasticsearchInstanceOffering",
"es:PurchaseReservedInstanceOffering",
"glacier:CompleteVaultLock",
"glacier:InitiateVaultLock",
"outposts:CreateOutpost",
"rds:PurchaseReservedDBInstancesOffering",
"redshift:PurchaseReservedNodeOffering",
"route53domains:RegisterDomain",
"route53domains:RenewDomain",
"route53domains:TransferDomain",
"s3-object-lambda:PutObjectLegalHold",
"s3-object-lambda:PutObjectRetention",
"s3:BypassGovernanceRetention",
"s3:PutBucketObjectLockConfiguration",
"s3:PutObjectLegalHold",
"s3:PutObjectRetention",
"savingsplans:CreateSavingsPlan",
"shield:CreateSubscription",
"snowball:CreateCluster"
],
"Resource": "*"
}
]
}
acm-pca:CreateCertificateAuthority
aws-marketplace:AcceptAgreementApprovalRequest
aws-marketplace:Subscribe
backup:PutBackupVaultLockConfiguration
bedrock:CreateProvisionedModelThroughput
bedrock:InvokeAgent
bedrock:InvokeModel
bedrock:InvokeModelWithResponseStream
dynamodb:PurchaseReservedCapacityOfferings
ec2:ModifyReservedInstances
ec2:PurchaseHostReservation
ec2:PurchaseReservedInstancesOffering
ec2:PurchaseScheduledInstances
elasticache:PurchaseReservedCacheNodesOffering
es:PurchaseReservedElasticsearchInstanceOffering
es:PurchaseReservedInstanceOffering
glacier:CompleteVaultLock
glacier:InitiateVaultLock
outposts:CreateOutpost
rds:PurchaseReservedDBInstancesOffering
redshift:PurchaseReservedNodeOffering
route53domains:RegisterDomain
route53domains:RenewDomain
route53domains:TransferDomain
s3-object-lambda:PutObjectLegalHold
s3-object-lambda:PutObjectRetention
s3:BypassGovernanceRetention
s3:PutBucketObjectLockConfiguration
s3:PutObjectLegalHold
s3:PutObjectRetention
savingsplans:CreateSavingsPlan
shield:CreateSubscription
snowball:CreateCluster
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment