Estou tendo um problema ao tentar rodar o cdk deploy --parameters Rds:senha=12345678 Rds
Rds | 09:12:32 | CREATE_FAILED | AWS::RDS::DBSubnetGroup | Rds-pedidos/SubnetGroup/Default (RdspedidosSubnetGroupA487F029) Resource handler returned message: "Subnet IDs are required. (Service: Rds, Status Code: 400, R
equest ID: ceeef90c-872a-41d4-bb02-5c44fb8037e3)" (RequestToken: e0636217-d5ee-ea1f-ad38-f26a3cc7bb43, HandlerErrorCode: InvalidRequest)
❌ Rds failed: Error: The stack named Rds failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE: Resource handler returned message: "Subnet IDs are required. (Service: Rds, Status Code: 400, Re
quest ID: ceeef90c-872a-41d4-bb02-5c44fb8037e3)" (RequestToken: e0636217-d5ee-ea1f-ad38-f26a3cc7bb43, HandlerErrorCode: InvalidRequest)
at FullCloudFormationDeployment.monitorDeployment (C:\Users\LuizGuilherme\AppData\Roaming\npm\node_modules\aws-cdk\lib\index.js:467:10232)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.deployStack2 [as deployStack] (C:\Users\LuizGuilherme\AppData\Roaming\npm\node_modules\aws-cdk\lib\index.js:470:180228)
at async C:\Users\LuizGuilherme\AppData\Roaming\npm\node_modules\aws-cdk\lib\index.js:470:163476
❌ Deployment failed: Error: The stack named Rds failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE: Resource handler returned message: "Subnet IDs are required. (Service: Rds, Status Code: 4
00, Request ID: ceeef90c-872a-41d4-bb02-5c44fb8037e3)" (RequestToken: e0636217-d5ee-ea1f-ad38-f26a3cc7bb43, HandlerErrorCode: InvalidRequest)
at FullCloudFormationDeployment.monitorDeployment (C:\Users\LuizGuilherme\AppData\Roaming\npm\node_modules\aws-cdk\lib\index.js:467:10232)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.deployStack2 [as deployStack] (C:\Users\LuizGuilherme\AppData\Roaming\npm\node_modules\aws-cdk\lib\index.js:470:180228)
at async C:\Users\LuizGuilherme\AppData\Roaming\npm\node_modules\aws-cdk\lib\index.js:470:163476
The stack named Rds failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE: Resource handler returned message: "Subnet IDs are required. (Service: Rds, Status Code: 400, Request ID: ceeef90c-872a
-41d4-bb02-5c44fb8037e3)" (RequestToken: e0636217-d5ee-ea1f-ad38-f26a3cc7bb43, HandlerErrorCode: InvalidRequest)
Fiz algumas pesquisas e tentativas mas nao consegui resolver.
Esse é o meu arquivo AluraVpcStack
package com.myorg;
import software.amazon.awscdk.Stack;
import software.amazon.awscdk.StackProps;
import software.amazon.awscdk.services.ec2.Vpc;
import software.amazon.awscdk.services.ecs.Cluster;
import software.amazon.awscdk.services.ecs.ContainerImage;
import software.amazon.awscdk.services.ecs.patterns.ApplicationLoadBalancedFargateService;
import software.amazon.awscdk.services.ecs.patterns.ApplicationLoadBalancedTaskImageOptions;
import software.constructs.Construct;
public class AluraVpcStack extends Stack {
private Vpc vpc;
public AluraVpcStack(final Construct scope, final String id) {
this(scope, id, null);
}
public AluraVpcStack(final Construct scope, final String id, final StackProps props) {
super(scope, id, props);
vpc = Vpc.Builder.create(this, "AluraVpc")
.maxAzs(1) // Default is all AZs in region
.natGateways(0)
.build();
}
public Vpc getVpc() {
return vpc;
}
}