“Have you tried turning it off and on again?” That’s usually the quickest and the most efficient advice you can tell someone debugging a problem. Sometimes there are things between heaven an earth that can’t be explained but can be solved by restarting a server.
For these cases Buttonize brings RDSInstanceControlPanel
construct. Let your L1 support or even non-technical colleagues handle the basic operations around RDS database instances.
Features
- CPU Utilization chart for the past hour
- Status information
- Actions
- Start - calls
StartDBInstance
RDS API to start the instance if it’s stopped - Stop - calls
StopDBInstance
RDS API to stop the instance if it’s running - Reboot - calls
RebootDBInstance
RDS API to reboot the instance if it’s running
- Start - calls
Preview
Usage
In case you create RDS DB instance in CDK
import * as cdk from 'aws-cdk-lib'import { InstanceClass, InstanceSize, InstanceType, SubnetType, Vpc } from 'aws-cdk-lib/aws-ec2'import { DatabaseInstance, DatabaseInstanceEngine } from 'aws-cdk-lib/aws-rds'import { Buttonize } from 'buttonize/cdk'import { RDSInstanceControlPanel } from 'buttonize/library'import { Construct } from 'constructs'
export class CdkStack extends cdk.Stack { constructor(scope: Construct, id: string, props?: cdk.StackProps) { super(scope, id, props)
Buttonize.init(this, { apiKey: 'YOUR_API_KEY' })
const defaultVpc = Vpc.fromLookup(this, 'VPC', { isDefault: true })
const instance = new DatabaseInstance(this, 'RdsInstance', { engine: DatabaseInstanceEngine.POSTGRES, vpc: defaultVpc, instanceType: InstanceType.of(InstanceClass.T4G, InstanceSize.MICRO), instanceIdentifier: 'my-little-test-buttonize-db', vpcSubnets: { subnetType: SubnetType.PUBLIC } })
new RDSInstanceControlPanel(this, 'ControlPanel', { instance }) }}
In case you create RDS outside of the CDK scope and know only database instance’s ARN
import * as cdk from 'aws-cdk-lib'import { Buttonize } from 'buttonize/cdk'import { RDSInstanceControlPanel } from 'buttonize/library'import { Construct } from 'constructs'
export class CdkStack extends cdk.Stack { constructor(scope: Construct, id: string, props?: cdk.StackProps) { super(scope, id, props)
Buttonize.init(this, { apiKey: 'YOUR_API_KEY' })
new RDSInstanceControlPanel(this, 'ControlPanel', { instanceArn: 'arn:aws:rds:<region>:<account-number>:db:<instance-name>' }) }}