AWSConfigRemediation-ConfigureS3PublicAccessBlock
Description
The AWSConfigRemediation-ConfigureS3PublicAccessBlock
runbook
configures an Amazon Web Services account's Amazon Simple Storage Service (Amazon S3) public access block settings based on
the values you specify in the runbook parameters.
Document type
Automation
Owner
Amazon
Platforms
Linux, macOS, Windows
Parameters
-
AccountId
Type: String
Description: (Required) The ID of the Amazon Web Services account that owns the S3 bucket you are configuring.
-
AutomationAssumeRole
Type: String
Allowed values: ^arn:(?:aws|aws-us-gov|aws-cn):iam::\d{12}:role\/[\w+=,.@/-]+$
Description: (Required) The Amazon Resource Name (ARN) of the Amazon Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf.
-
BlockPublicAcls
Type: Boolean
Default: true
Description: (Optional) If set to
true
, Amazon S3 blocks public access control lists (ACLs) for S3 buckets owned by the Amazon Web Services account you specify in theAccountId
parameter. -
BlockPublicPolicy
Type: Boolean
Default: true
Description: (Optional) If set to
true
, Amazon S3 blocks public bucket policies for S3 buckets owned by the Amazon Web Services account you specify in theAccountId
parameter. -
IgnorePublicAcls
Type: Boolean
Default: true
Description: (Optional) If set to
true
, Amazon S3 ignores all public ACLs for S3 buckets owned by the Amazon Web Services account you specify in theAccountId
parameter. -
RestrictPublicBuckets
Type: Boolean
Default: true
Description: (Optional) If set to
true
, Amazon S3 restricts public bucket policies for S3 buckets owned by the Amazon Web Services account you specify in theAccountId
parameter.
Required IAM permissions
The AutomationAssumeRole
parameter requires the following actions to
successfully use the runbook.
-
ssm:StartAutomationExecution
-
ssm:GetAutomationExecution
-
s3:GetAccountPublicAccessBlock
-
s3:PutAccountPublicAccessBlock
Document Steps
-
aws:executeAwsApi
- Creates or modifies thePublicAccessBlock
configuration for the Amazon Web Services account specified in theAccountId
parameter. -
aws:executeScript
- Returns thePublicAccessBlock
configuration for the Amazon Web Services account specified in theAccountId
parameter, and verifies the changes were successfully made based on the values specified in the runbook parameters.