Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Epic: RDS Instances MVP #3389

Closed
6 of 11 tasks
Laren-AWS opened this issue Jul 28, 2022 · 1 comment
Closed
6 of 11 tasks

Epic: RDS Instances MVP #3389

Laren-AWS opened this issue Jul 28, 2022 · 1 comment
Assignees

Comments

@Laren-AWS
Copy link
Contributor

Laren-AWS commented Jul 28, 2022

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 RDS instance APIs. The RDS guide is here.

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:

DescribeDbParameterGroups
CreateDbParameterGroup
ModifyDbParameterGroup
DeleteDbParameterGroup
DescribeDbEngineVersions
DescribeDbParameters
DescribeOrderableDbInstanceOptions
DescribeDbInstances
CreateDbInstance
DeleteDbInstance
CreateDbSnapshot
DescribeDbSnapshots

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.

Get started with RDS instances

  1. Get available engine families for RDS MySql. rds.DescribeDbEngineVersions(Engine='mysql') and build a set of the 'DBParameterGroupFamily' field values. I get {mysql5.7, mysql8.0}.
  2. Select an engine family and create a custom DB parameter group. rds.CreateDbParameterGroup(DBParameterGroupFamily='mysql8.0')
  3. Get the parameter group. rds.DescribeDbParameterGroups
  4. 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.DescribeDbParameters
  5. Parse the ParameterName, Description, and AllowedValues values and display them.
  6. 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.ModifyDbParameterGroup.
  7. Get and display the updated parameters. Specify Source of 'user' to get just the modified parameters. rds.DescribeDbParameters(Source='user')
  8. Get a list of allowed engine versions. rds.DescribeDbEngineVersions(Engine='mysql', DBParameterGroupFamily=<the family used to create your parameter group in step 2>)
  9. Get a list of micro instance classes available for the selected engine and engine version. rds.DescribeOrderableDbInstanceOptions(Engine='mysql', EngineVersion=[selected engine version]), then filter the list to a set that includes 'micro'. I get: {db.t2.micro, db.t3.micro, db.t4g.micro}.
  10. Create an RDS database instance that contains a MySql database and uses the parameter group you created.
self.rds_client.create_db_instance(
                DBName=db_name,
                DBInstanceIdentifier=instance_id,
                DBParameterGroupName=parameter_group_name,
                Engine=db_engine,
                EngineVersion=db_engine_version,
                DBInstanceClass=instance_class,
                StorageType='standard',
                AllocatedStorage=5,
                MasterUsername=admin_name,
                MasterUserPassword=admin_password)
  1. Wait for DB instance to be ready. Call rds.DescribeDbInstances and check for DBInstanceStatus == 'available'. (This can take more than 10 mins)
  2. Display the connection string that can be used to connect a 'mysql' shell to the database. In Python:
print(f"\n\tmysql -h {db_inst['Endpoint']['Address']} -P {db_inst['Endpoint']['Port']} "
          f"-u {db_inst['MasterUsername']} -p\n")
  1. Create a snapshot of the DB instance. rds.CreateDbSnapshot.
  2. Wait for snapshot to create. rds.DescribeDbSnapshots until Status == 'available.
  3. Delete the DB instance. rds.DeleteDbInstance
  4. Wait for the instance to delete. rds.DescribeDbInstances until it returns not found.
  5. Delete the parameter group. rds.DeleteDbParameterGroup.

Metadata

In rds_metadata:

rds_DescribeDbParameterGroups
rds_CreateDbParameterGroup
rds_ModifyDbParameterGroup
rds_DeleteDbParameterGroup
rds_DescribeDbEngineVersions
rds_DescribeDbParameters
rds_DescribeOrderableDbInstanceOptions
rds_DescribeDbInstances
rds_CreateDbInstance
rds_DeleteDbInstance
rds_CreateDbSnapshot
rds_DescribeDbSnapshots
rds_Scenario_GetStartedInstances

SDKs

Exit criteria:

Runnable scenario code.
Service action code (may be same as scenario code).
Integration or unit tests.
Scenario and API examples tagged for SOS.
README

@Laren-AWS Laren-AWS mentioned this issue Aug 2, 2022
5 tasks
@brmur brmur removed their assignment Sep 13, 2022
@Laren-AWS Laren-AWS changed the title Epic: RDS MVP Epic: RDS Instances MVP Sep 13, 2022
@rlhagerm rlhagerm reopened this Sep 22, 2022
@github-actions github-actions bot removed the Epic label Jul 20, 2023
@DavidSouther DavidSouther removed their assignment Jan 24, 2024
@DavidSouther
Copy link
Contributor

Rust in #5476

@brmur brmur closed this as completed May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants