C++ Aurora MVP
The RDS guides are divided into two feature groups: RDS, which is focused on instances, and Aurora, which is focused on clusters. The APIs for both of these features are mixed together in the same RDS service client.
This epic is about the Aurora cluster APIs. The Aurora guide is here.
IMPORTANT Although all of the APIs are in one RDS client, the service team treats Aurora as a separate service with its own service guide. We mirror this by creating a separate aurora folder at the same level as other services.
Service actions
Service actions can either be pulled out as individual functions or can be incorporated into the scenario, but each service action must be included as an excerpt in the SOS output.
RDS client:
DescribeDbClusterParameterGroups CreateDbClusterParameterGroup ModifyDbClusterParameterGroup DeleteDbClusterParameterGroup DescribeDbEngineVersions DescribeDbClusterParameters DescribeDbClusters CreateDbCluster DeleteDbCluster DescribeOrderableDbInstanceOptions DescribeDbInstances CreateDbInstance DeleteDbInstance CreateDbClusterSnapshot DescribeDbClusterSnapshots
Scenario
A scenario runs at a command prompt and prints output to the user on the result of each service action. A scenario can run in one of two ways: straight through, printing out progress as it goes, or as an interactive question/answer script.
Getting started with Aurora Clusters
- Get available engine families for Aurora MySql. rds.DescribeDbEngineVersions(Engine='aurora-mysql') and build a set of the 'DBParameterGroupFamily' field values. I get {aurora-mysql8.0, aurora-mysql5.7}.
- Select an engine family and create a custom DB cluster parameter group. rds.CreateDbClusterParameterGroup(DBParameterGroupFamily='aurora-mysql8.0')
- Get the parameter group. rds.DescribeDbClusterParameterGroups
- Get parameters in the group. This is a long list so you will have to paginate. Find the auto_increment_offset and auto_increment_increment parameters (by ParameterName). rds.DescribeDbClusterParameters
- Parse the ParameterName, Description, and AllowedValues values and display them.
- Modify both the auto_increment_offset and auto_increment_increment parameters in one call in the custom parameter group. Set their ParameterValue fields to a new allowable value. rds.ModifyDbClusterParameterGroup.
- Get and display the updated parameters. Specify Source of 'user' to get just the modified parameters. rds.DescribeDbClusterParameters(Source='user')
- Get a list of allowed engine versions. rds.DescribeDbEngineVersions(Engine='aurora-mysql', DBParameterGroupFamily=<the family used to create your parameter group in step 2>)
- Create an Aurora DB cluster database cluster that contains a MySql database and uses the parameter group you created.
self.rds_client.create_db_cluster(
DatabaseName=db_name,
DBClusterIdentifier=cluster_name,
DBClusterParameterGroupName=parameter_group_name,
Engine=db_engine,
EngineVersion=db_engine_version,
MasterUsername=admin_name,
MasterUserPassword=admin_password)
- Wait for DB cluster to be ready. Call rds.DescribeDBClusters and check for Status == 'available'.
- Get a list of instance classes available for the selected engine and engine version. rds.DescribeOrderableDbInstanceOptions(Engine='mysql', EngineVersion=).
- Create a database instance in the cluster.
self.rds_client.create_db_instance(
DBInstanceIdentifier=instance_id,
DBClusterIdentifier=cluster_id,
Engine=db_engine,
DBInstanceClass=instance_class)
- Wait for DB instance to be ready. Call rds.DescribeDbInstances and check for DBInstanceStatus == 'available'.
- Display the connection string that can be used to connect a 'mysql' shell to the cluster. In Python:
print(f"\n\tmysql -h {cluster['Endpoint']} -P {cluster['Port']} -u {cluster['MasterUsername']} -p\n")
- Create a snapshot of the DB cluster. rds.CreateDbClusterSnapshot.
- Wait for the snapshot to create. rds.DescribeDbClusterSnapshots until Status == 'available'.
- Delete the instance. rds.DeleteDbInstance.
- Delete the DB cluster. rds.DeleteDbCluster.
- Wait for the instance and cluster to fully delete. rds.DescribeDbInstances and rds.DescribeDbClusters until both are not found.
- Delete the DB cluster parameter group. rds.DeleteDbClusterParameterGroup.
Metadata
In aurora_metadata:
aurora_DescribeDbClusterParameterGroups aurora_CreateDbClusterParameterGroup aurora_ModifyDbClusterParameterGroup aurora_DeleteDbClusterParameterGroup aurora_DescribeDbEngineVersions aurora_DescribeDbClusterParameters aurora_DescribeDbClusters aurora_CreateDbCluster aurora_DeleteDbCluster aurora_DescribeOrderableDbInstanceOptions aurora_DescribeDbInstances aurora_CreateDbInstance aurora_DeleteDbInstance aurora_CreateDbClusterSnapshot aurora_DescribeDbClusterSnapshots aurora_Scenario_GetStartedAuroraClusters
Delete Instance working is missing in this MVP.
Hi Nashet, Thanks for your feedback. I am not sure what you are referring to. This issue has not been implemented yet.