AWSSupportRemediator-DisablePublicAccessOnRedshiftCluster
Description
Disables public accessibility on an Amazon Redshift cluster by setting the PubliclyAccessible attribute to false.
The runbook calls the Amazon Redshift ModifyCluster API, waits for the cluster to return to the available state, and asserts that PubliclyAccessible is false on completion.
This automation remediates findings identified by Amazon Well-Architected Agent. It remediates findings from Amazon Security Hub CSPM control Amazon Redshift clusters should prohibit public access.
If the Amazon Redshift cluster does not exist or public access is already disabled, the automation completes successfully without making changes.
Disabling public access removes the cluster's public endpoint. Clients that connect over the internet lose connectivity. After the change, only clients reachable through the cluster's Amazon Virtual Private Cloud (Amazon VPC) can connect. The cluster briefly transitions out of the available state during the modification.
You are responsible for reviewing automation actions before they run.
This automation might cause stack drift if the resource is part of an Amazon CloudFormation stack.
Access to
AWSSupportRemediator-*runbooks requires an active Business Support+, Enterprise Support, or Unified Operations Support plan. For more information, see Compare Amazon Web Services Support Planson the Amazon website.
Document type
Automation
Owner
Amazon
Platforms
Linux, macOS, Windows
Parameters
-
AutomationAssumeRole
Type: String
Description: (Optional) 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. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook.
-
ClusterIdentifier
Type: String
Description: (Required) The unique identifier of the Amazon Redshift cluster.
Required IAM permissions
The AutomationAssumeRole parameter requires the following actions to
use the runbook successfully.
-
redshift:DescribeClusters -
redshift:ModifyCluster
Document Steps
-
validateCluster - Checks whether the specified Amazon Redshift cluster exists and whether its
PubliclyAccessibleattribute is alreadyfalse. Returns no change required when the cluster does not exist or already has public access disabled. -
branchOnChangeRequired - Branches on whether a change is required. Continues to
disableClusterPublicAccesswhenvalidateCluster.ChangeRequiredistrue. Otherwise, ends the runbook successfully. -
disableClusterPublicAccess - Calls the Amazon Redshift
ModifyClusterAPI on the specified cluster withPubliclyAccessibleset tofalse. The cluster transitions out of theavailablestate during the modification. -
waitForClusterAvailability - Waits until the Amazon Redshift cluster returns to the
availablestate after theModifyClustercall. This confirms that the cluster has applied the change before the runbook verifies the final state. -
assertFinalPublicAccessIsDisabled - Asserts that the Amazon Redshift cluster's
PubliclyAccessibleattribute isfalseafter the modification completes. The step fails if the cluster is still publicly accessible.
Outputs
-
validateCluster.ChangeRequired: Whether a change is required.
falsewhen the cluster does not exist or already has public access disabled. -
validateCluster.ValidationMessage: A message describing why no change is required, or
N/Awhen a change is required.