Skip to main content

blue_green_deployments

Creates, updates, deletes, gets or lists a blue_green_deployments resource.

Overview

Nameblue_green_deployments
TypeResource
Idaws.rds.blue_green_deployments

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
blue_green_deployment_identifierstringThe unique identifier of the blue/green deployment.
blue_green_deployment_namestringThe user-supplied name of the blue/green deployment.
create_timestringThe time when the blue/green deployment was created, in Universal Coordinated Time (UTC).
delete_timestringThe time when the blue/green deployment was deleted, in Universal Coordinated Time (UTC).
sourcestringThe source database for the blue/green deployment. Before switchover, the source database is the production database in the blue environment.
statusstringThe status of the blue/green deployment. Valid Values: PROVISIONING - Resources are being created in the green environment. AVAILABLE - Resources are available in the green environment. SWITCHOVER_IN_PROGRESS - The deployment is being switched from the blue environment to the green environment. SWITCHOVER_COMPLETED - Switchover from the blue environment to the green environment is complete. INVALID_CONFIGURATION - Resources in the green environment are invalid, so switchover isn't possible. SWITCHOVER_FAILED - Switchover was attempted but failed. DELETING - The blue/green deployment is being deleted.
status_detailsstringAdditional information about the status of the blue/green deployment.
switchover_detailsstringThe details about each source and target resource in the blue/green deployment.
tag_liststringA list of tags. For more information, see Tagging Amazon RDS resources in the Amazon RDS User Guide or Tagging Amazon Aurora and Amazon RDS resources in the Amazon Aurora User Guide.
targetstringThe target database for the blue/green deployment. Before switchover, the target database is the clone database in the green environment.
tasksstringEither tasks to be performed or tasks that have been completed on the target database before switchover.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_blue_green_deploymentsselectregionBlueGreenDeploymentIdentifier, Filters, Marker, MaxRecordsDescribes one or more blue/green deployments. For more information, see Using Amazon RDS Blue/Green Deployments for database updates in the Amazon RDS User Guide and Using Amazon RDS Blue/Green Deployments for database updates in the Amazon Aurora User Guide.
create_blue_green_deploymentinsertBlueGreenDeploymentName, regionSource, TargetEngineVersion, TargetDBParameterGroupName, TargetDBClusterParameterGroupName, Tags, TargetDBInstanceClass, UpgradeTargetStorageConfig, TargetIops, TargetStorageType, TargetAllocatedStorage, TargetStorageThroughputCreates a blue/green deployment. A blue/green deployment creates a staging environment that copies the production environment. In a blue/green deployment, the blue environment is the current production environment. The green environment is the staging environment, and it stays in sync with the current production environment. You can make changes to the databases in the green environment without affecting production workloads. For example, you can upgrade the major or minor DB engine version, change database parameters, or make schema changes in the staging environment. You can thoroughly test changes in the green environment. When ready, you can switch over the environments to promote the green environment to be the new production environment. The switchover typically takes under a minute. For more information, see Using Amazon RDS Blue/Green Deployments for database updates in the Amazon RDS User Guide and Using Amazon RDS Blue/Green Deployments for database updates in the Amazon Aurora User Guide.
delete_blue_green_deploymentdeleteBlueGreenDeploymentIdentifier, regionDeleteTargetDeletes a blue/green deployment. For more information, see Using Amazon RDS Blue/Green Deployments for database updates in the Amazon RDS User Guide and Using Amazon RDS Blue/Green Deployments for database updates in the Amazon Aurora User Guide.
switchover_blue_green_deploymentexecBlueGreenDeploymentIdentifier, regionSwitchoverTimeoutSwitches over a blue/green deployment. Before you switch over, production traffic is routed to the databases in the blue environment. After you switch over, production traffic is routed to the databases in the green environment. For more information, see Using Amazon RDS Blue/Green Deployments for database updates in the Amazon RDS User Guide and Using Amazon RDS Blue/Green Deployments for database updates in the Amazon Aurora User Guide.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
BlueGreenDeploymentIdentifierstringThe resource ID of the blue/green deployment. Constraints: Must match an existing blue/green deployment resource ID.
BlueGreenDeploymentNamestringThe name of the blue/green deployment. Constraints: Can't be the same as an existing blue/green deployment name in the same account and Amazon Web Services Region.
regionstringAWS region (default: us-east-1)
BlueGreenDeploymentIdentifierstringThe blue/green deployment identifier. If you specify this parameter, the response only includes information about the specific blue/green deployment. This parameter isn't case-sensitive. Constraints: Must match an existing blue/green deployment identifier.
DeleteTargetbooleanSpecifies whether to delete the resources in the green environment. You can't specify this option if the blue/green deployment status is SWITCHOVER_COMPLETED.
FiltersarrayA filter that specifies one or more blue/green deployments to describe. Valid Values: blue-green-deployment-identifier - Accepts system-generated identifiers for blue/green deployments. The results list only includes information about the blue/green deployments with the specified identifiers. blue-green-deployment-name - Accepts user-supplied names for blue/green deployments. The results list only includes information about the blue/green deployments with the specified names. source - Accepts source databases for a blue/green deployment. The results list only includes information about the blue/green deployments with the specified source databases. target - Accepts target databases for a blue/green deployment. The results list only includes information about the blue/green deployments with the specified target databases.
MarkerstringAn optional pagination token provided by a previous DescribeBlueGreenDeployments request. If you specify this parameter, the response only includes records beyond the marker, up to the value specified by MaxRecords.
MaxRecordsintegerThe maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a pagination token called a marker is included in the response so you can retrieve the remaining results. Default: 100 Constraints: Must be a minimum of 20. Can't exceed 100.
SourcestringThe Amazon Resource Name (ARN) of the source production database. Specify the database that you want to clone. The blue/green deployment creates this database in the green environment. You can make updates to the database in the green environment, such as an engine version upgrade. When you are ready, you can switch the database in the green environment to be the production database.
SwitchoverTimeoutintegerThe amount of time, in seconds, for the switchover to complete. Default: 300 If the switchover takes longer than the specified duration, then any changes are rolled back, and no changes are made to the environments.
TagsarrayTags to assign to the blue/green deployment.
TargetAllocatedStorageintegerThe amount of storage in gibibytes (GiB) to allocate for the green DB instance. You can choose to increase or decrease the allocated storage on the green DB instance. This setting doesn't apply to Amazon Aurora blue/green deployments.
TargetDBClusterParameterGroupNamestringThe DB cluster parameter group associated with the Aurora DB cluster in the green environment. To test parameter changes, specify a DB cluster parameter group that is different from the one associated with the source DB cluster.
TargetDBInstanceClassstringSpecify the DB instance class for the databases in the green environment. This parameter only applies to RDS DB instances, because DB instances within an Aurora DB cluster can have multiple different instance classes. If you're creating a blue/green deployment from an Aurora DB cluster, don't specify this parameter. After the green environment is created, you can individually modify the instance classes of the DB instances within the green DB cluster.
TargetDBParameterGroupNamestringThe DB parameter group associated with the DB instance in the green environment. To test parameter changes, specify a DB parameter group that is different from the one associated with the source DB instance.
TargetEngineVersionstringThe engine version of the database in the green environment. Specify the engine version to upgrade to in the green environment.
TargetIopsintegerThe amount of Provisioned IOPS (input/output operations per second) to allocate for the green DB instance. For information about valid IOPS values, see Amazon RDS DB instance storage in the Amazon RDS User Guide. This setting doesn't apply to Amazon Aurora blue/green deployments.
TargetStorageThroughputintegerThe storage throughput value for the green DB instance. This setting applies only to the gp3 storage type. This setting doesn't apply to Amazon Aurora blue/green deployments.
TargetStorageTypestringThe storage type to associate with the green DB instance. Valid Values: gp2 | gp3 | io1 | io2 This setting doesn't apply to Amazon Aurora blue/green deployments.
UpgradeTargetStorageConfigbooleanWhether to upgrade the storage file system configuration on the green database. This option migrates the green DB instance from the older 32-bit file system to the preferred configuration. For more information, see Upgrading the storage file system for a DB instance.

SELECT examples

Describes one or more blue/green deployments. For more information, see Using Amazon RDS Blue/Green Deployments for database updates in the Amazon RDS User Guide and Using Amazon RDS Blue/Green Deployments for database updates in the Amazon Aurora User Guide.

SELECT
blue_green_deployment_identifier,
blue_green_deployment_name,
create_time,
delete_time,
source,
status,
status_details,
switchover_details,
tag_list,
target,
tasks
FROM aws.rds.blue_green_deployments
WHERE region = '{{ region }}' -- required
AND BlueGreenDeploymentIdentifier = '{{ BlueGreenDeploymentIdentifier }}'
AND Filters = '{{ Filters }}'
AND Marker = '{{ Marker }}'
AND MaxRecords = '{{ MaxRecords }}'
;

INSERT examples

Creates a blue/green deployment. A blue/green deployment creates a staging environment that copies the production environment. In a blue/green deployment, the blue environment is the current production environment. The green environment is the staging environment, and it stays in sync with the current production environment. You can make changes to the databases in the green environment without affecting production workloads. For example, you can upgrade the major or minor DB engine version, change database parameters, or make schema changes in the staging environment. You can thoroughly test changes in the green environment. When ready, you can switch over the environments to promote the green environment to be the new production environment. The switchover typically takes under a minute. For more information, see Using Amazon RDS Blue/Green Deployments for database updates in the Amazon RDS User Guide and Using Amazon RDS Blue/Green Deployments for database updates in the Amazon Aurora User Guide.

INSERT INTO aws.rds.blue_green_deployments (
BlueGreenDeploymentName,
region,
Source,
TargetEngineVersion,
TargetDBParameterGroupName,
TargetDBClusterParameterGroupName,
Tags,
TargetDBInstanceClass,
UpgradeTargetStorageConfig,
TargetIops,
TargetStorageType,
TargetAllocatedStorage,
TargetStorageThroughput
)
SELECT
'{{ BlueGreenDeploymentName }}',
'{{ region }}',
'{{ Source }}',
'{{ TargetEngineVersion }}',
'{{ TargetDBParameterGroupName }}',
'{{ TargetDBClusterParameterGroupName }}',
'{{ Tags }}',
'{{ TargetDBInstanceClass }}',
'{{ UpgradeTargetStorageConfig }}',
'{{ TargetIops }}',
'{{ TargetStorageType }}',
'{{ TargetAllocatedStorage }}',
'{{ TargetStorageThroughput }}'
RETURNING
blue_green_deployment_identifier,
blue_green_deployment_name,
create_time,
delete_time,
source,
status,
status_details,
switchover_details,
tag_list,
target,
tasks
;

DELETE examples

Deletes a blue/green deployment. For more information, see Using Amazon RDS Blue/Green Deployments for database updates in the Amazon RDS User Guide and Using Amazon RDS Blue/Green Deployments for database updates in the Amazon Aurora User Guide.

DELETE FROM aws.rds.blue_green_deployments
WHERE BlueGreenDeploymentIdentifier = '{{ BlueGreenDeploymentIdentifier }}' --required
AND region = '{{ region }}' --required
AND DeleteTarget = '{{ DeleteTarget }}'
;

Lifecycle Methods

Switches over a blue/green deployment. Before you switch over, production traffic is routed to the databases in the blue environment. After you switch over, production traffic is routed to the databases in the green environment. For more information, see Using Amazon RDS Blue/Green Deployments for database updates in the Amazon RDS User Guide and Using Amazon RDS Blue/Green Deployments for database updates in the Amazon Aurora User Guide.

EXEC aws.rds.blue_green_deployments.switchover_blue_green_deployment
@BlueGreenDeploymentIdentifier='{{ BlueGreenDeploymentIdentifier }}' --required,
@region='{{ region }}' --required,
@SwitchoverTimeout='{{ SwitchoverTimeout }}'
;