Getting error while creating RDS instance #22268
Unanswered
GirishMadheswaran
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I can't reproduce your error. My full code: import {
App, Stack,
aws_rds as rds,
aws_ec2 as ec2,
} from 'aws-cdk-lib';
import { Construct } from 'constructs';
// for development, use account/region from cdk cli
const devEnv = {
account: process.env.CDK_DEFAULT_ACCOUNT,
region: process.env.CDK_DEFAULT_REGION,
};
const app = new App();
export class Demo extends Construct {
constructor(scope: Construct, id: string) {
super(scope, id);
// const vpc = new ec2.Vpc(this, 'VPC');
const vpc = ec2.Vpc.fromLookup(this, 'Vpc', { isDefault: true });
new rds.DatabaseCluster(this, 'Database', {
engine: rds.DatabaseClusterEngine.auroraMysql({ version: rds.AuroraMysqlEngineVersion.VER_2_08_1 }),
credentials: rds.Credentials.fromGeneratedSecret('clusteradmin'),
instanceProps: {
vpc,
},
});
}
}
const stack = new Stack(app, 'gitpod-workspace-dev2', { env: devEnv });
new Demo(stack, 'Demo');
// new MyStack(app, 'gitpod-workspace-prod', { env: prodEnv });
app.synth(); $ npx cdk --version |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The below error I am getting while creating a RDS Database
16:40:31 | CREATE_FAILED | AWS::RDS::DBInstance | Database/Instance1
Resource handler returned message: "DBInstance checkstack-databaseinstance1844f58fd-b1doax4eya1u not found. (Service: Rds, Status Code: 404, Request ID: f11fb2bc-d6a0-
47c8-88de-a2540bb407f3)" (RequestToken: 7346808f-9ad5-ab24-a686-54eab5d6d5a9, HandlerErrorCode: NotFound)
16:40:33 | ROLLBACK_IN_PROGRESS | AWS::CloudFormation::Stack | CheckStack
The following resource(s) failed to create: [DatabaseInstance1844F58FD, DatabaseInstance2AA380DEE]. Rollback requested by user.
16:40:33 | ROLLBACK_IN_PROGRESS | AWS::CloudFormation::Stack | CheckStack
The following resource(s) failed to create: [DatabaseInstance1844F58FD, DatabaseInstance2AA380DEE]. Rollback requested by user.
16:40:52 | DELETE_IN_PROGRESS | AWS::RDS::DBInstance | Database/Instance2
Here is my code
const vpc = new ec2.Vpc(this, 'VPC');
const cluster = new rds.DatabaseCluster(this, 'Database', {
engine: rds.DatabaseClusterEngine.auroraMysql({ version: rds.AuroraMysqlEngineVersion.VER_2_08_1 }),
credentials: rds.Credentials.fromGeneratedSecret('clusteradmin'),
instanceProps: {
// instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL),
// vpcSubnets: {
// subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS,
// },
vpc,
},
});
Beta Was this translation helpful? Give feedback.
All reactions