stratospheric-dev / cdk-constructs Goto Github PK
View Code? Open in Web Editor NEWSome CDK constructs to get started with deploying to AWS.
License: Apache License 2.0
Some CDK constructs to get started with deploying to AWS.
License: Apache License 2.0
A common security group is required for some supporting services such as ActiveMQ via Amazon MQ. Therefore, it probably makes sense to have such a group's ID exported so other services can depend on it.
Get this error when deploying stratospheric (using CDK)
staging-todo-app-Database: creating CloudFormation changeset...
15:39:09 | CREATE_FAILED | AWS::RDS::DBInstance | DatabasepostgresInstance8
EA39D5E
Resource handler returned message: "Cannot find version 12.9 for postgres (Service: Rds, Status Code: 400
, Request ID: 2396ae25-09d4-474c-90cc-a7c516dedbac)" (RequestToken: 4079704e-08ce-7c66-f08c-b47707583196,
HandlerErrorCode: InvalidRequest)
❌ DatabaseStack (staging-todo-app-Database) failed: Error: The stack named staging-todo-app-Database failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE: Resource handler returned message: "Cannot find version 12.9 for postgres (Service: Rds, Status Code: 400, Request ID: 2396ae25-09d4-474c-90cc-a7c516dedbac)" (RequestToken: 4079704e-08ce-7c66-f08c-b47707583196, HandlerErrorCode: InvalidRequest)
at prepareAndExecuteChangeSet (/Users/tspencer/Desktop/stratospheric/cdk/node_modules/aws-cdk/lib/api/deploy-stack.ts:386:13)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at deployStack2 (/Users/tspencer/Desktop/stratospheric/cdk/node_modules/aws-cdk/lib/cdk-toolkit.ts:240:24)
at /Users/tspencer/Desktop/stratospheric/cdk/node_modules/aws-cdk/lib/deploy.ts:39:11
at run (/Users/tspencer/Desktop/stratospheric/cdk/node_modules/p-queue/dist/index.js:163:29)
❌ Deployment failed: Error: Stack Deployments Failed: Error: The stack named staging-todo-app-Database failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE: Resource handler returned message: "Cannot find version 12.9 for postgres (Service: Rds, Status Code: 400, Request ID: 2396ae25-09d4-474c-90cc-a7c516dedbac)" (RequestToken: 4079704e-08ce-7c66-f08c-b47707583196, HandlerErrorCode: InvalidRequest)
at deployStacks (/Users/tspencer/Desktop/stratospheric/cdk/node_modules/aws-cdk/lib/deploy.ts:61:11)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at CdkToolkit.deploy (/Users/tspencer/Desktop/stratospheric/cdk/node_modules/aws-cdk/lib/cdk-toolkit.ts:312:7)
at initCommandLine (/Users/tspencer/Desktop/stratospheric/cdk/node_modules/aws-cdk/lib/cli.ts:349:12)
Stack Deployments Failed: Error: The stack named staging-todo-app-Database failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE: Resource handler returned message: "Cannot find version 12.9 for postgres (Service: Rds, Status Code: 400, Request ID: 2396ae25-09d4-474c-90cc-a7c516dedbac)" (RequestToken: 4079704e-08ce-7c66-f08c-b47707583196, HandlerErrorCode: InvalidRequest)
Not sure if the book needs to be update to new dependency version from:
<dependency>
<groupId>dev.stratospheric</groupId>
<artifactId>cdk-constructs</artifactId>
<version>0.0.27</version>
</dependency>
to
<dependency>
<groupId>dev.stratospheric</groupId>
<artifactId>cdk-constructs</artifactId>
<version>0.1.0</version>
</dependency>
After the change above it compiles, but still, there is some incongruence after running the dependency tree:
Dependency convergence error for software.amazon.awscdk:aws-cdk-lib:2.5.0 paths to dependency are:
+-com.myorg:first_cdk_app:0.1
+-dev.stratospheric:cdk-constructs:0.1.0
+-software.amazon.awscdk:aws-cdk-lib:2.5.0
and
+-com.myorg:first_cdk_app:0.1
+-software.amazon.awscdk:aws-cdk-lib:2.0.0
[WARNING] Rule 0: org.apache.maven.plugins.enforcer.DependencyConvergence failed with message:
Failed while enforcing releasability the error(s) are [
Dependency convergence error for software.amazon.awscdk:aws-cdk-lib:2.5.0 paths to dependency are:
+-com.myorg:first_cdk_app:0.1
+-dev.stratospheric:cdk-constructs:0.1.0
+-software.amazon.awscdk:aws-cdk-lib:2.5.0
and
+-com.myorg:first_cdk_app:0.1
+-software.amazon.awscdk:aws-cdk-lib:2.0.0
]
You can reproduce the above issue by adding:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.4.1</version>
<configuration>
<rules><dependencyConvergence/></rules>
</configuration>
</plugin>
And running:
mvn enforcer:enforce
It seems you are ahead of AWS
Hi there,
I faced an issue after adding this maven dependency in my cdk app.
I got the following error while packaging my app. I googled it and seems like java version issue.
Could you please take a look?
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project cp-cdk: Compilation failure [ERROR] /Users/atulkumar/CodePanja/cp-cdk/src/main/java/com/myorg/CpCdkApp.java:[5,29] cannot access dev.stratospheric.cdk.SpringBootApplicationStack [ERROR] bad class file: /Users/atulkumar/.m2/repository/dev/stratospheric/cdk-constructs/0.0.20/cdk-constructs-0.0.20.jar(dev/stratospheric/cdk/SpringBootApplicationStack.class) [ERROR] class file has wrong version 55.0, should be 52.0 [ERROR] Please remove or make sure it appears in the correct subdirectory of the classpath.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.