Using Console
Using CLI
dynamodb:BatchExecuteStatement
action. Use aws iam
commands to modify the associated policies.dynamodb:BatchGetItem
action.dynamodb:GetItem
.dynamodb:TransactGetItems
action.ec2:AttachVolume
action.ec2:CopySnapshot
action.ec2:CreateReplaceRootVolumeTask
action.ec2:CreateSnapshot
action.ec2:CreateSnapshots
action.ec2:CreateTags
action.ec2:CreateVolume
action.ec2:DetachVolume
action.ec2:ModifySnapshotAttribute
action.ec2:ModifySnapshotTier
action.ec2:ModifyVolume
action.ec2:ModifyVolumeAttribute
action.ec2:ResetSnapshotAttribute
action.ec2:RestoreSnapshotFromRecycleBin
action.ec2:RestoreSnapshotTier
action.iam:GetUser
action.kms:Decrypt
action using aws kms
.rds:CopyDBClusterSnapshot
action.rds:CopyDBSnapshot
action.rds:CreateDBClusterSnapshot
action.rds:CreateDBInstanceReadReplica
action.rds:CreateDBSnapshot
action.rds:ModifyDBCluster
action.rds:ModifyDBClusterSnapshotAttribute
action.rds:ModifyDBInstance
action.rds:ModifyDBSnapshot
action.rds:ModifyDBSnapshotAttribute
action.rds:ModifyGlobalInstance
action.rds:Select
action.s3:CopyObject
action using aws s3api
.s3:GetBucketTagging
action using aws s3api
.s3:GetObject
action using aws s3api
.s3:HeadBucket
action using aws s3api
.s3:HeadObject
action using aws s3api
.s3:PutBucketPolicy
action using aws s3api
.s3:PutObjectAcl
action using aws s3api
.s3:RestoreObject
action using aws s3api
.s3:SelectObjectContent
action using aws s3api
.secretsmanager:GetSecretValue
action using aws secretsmanager
.ssm:GetParameter
action using aws ssm
.ssm:GetParameters
action using aws ssm
.ssm:GetParametersByPath
action using aws ssm
.<RoleName>
, <BucketName>
, <KeyId>
, and <SecretId>
with the actual resource names in your AWS environment. Always test policy changes in a safe environment to avoid unintended access issues.Using Python
pip install boto3
) and configured with the necessary AWS credentials before running the scripts.Note: The following examples provide a high-level overview, and you should tailor them to your specific needs.policy_document
to suit your specific needs.
s3:CopyObject
:
policy
to match your requirements.
kms:Decrypt
:
policy
to meet your needs.
secretsmanager
and for Parameter Store, you can use ssm
.
For example, to deny secretsmanager:GetSecretValue
:
resource_policy
as needed.