Comments (10)
I can confirm this approach works.:
- Check out the most recent commit to the cdk-construct repo's main branch (9191b42)
- Make two changes to
pom.xml
:- Modify the property
aws-cdk-lib.version
to have the value 2.130.0 - Change the
<version>
property to have the value 0.1.14-SNAPSHOT
- Modify the property
- Execute
mvn install
to install that version of the project to my local repository - Changed the reference to cdk-constructs in my deployment project's
pom.xml
from version 0.1.13 to 0.1.14-SNAPSHOT - Ran
npm cognito:deploy
from stratospheric.
@giuliopulina thanks for all your help following up on this. I will give this a shot and see what I can do.
from stratospheric.
Thanks for this discussion and finding a workaround. I'm closing this for now since the issue has been resolved. We'll release a new version of https://github.com/stratospheric-dev/cdk-constructs soon and update to that version.
from stratospheric.
I think that the lambda is auto-generated to retrieve the client secret from the user pool.
{
"DescribeCognitoUserPoolClient": {
"id": "DescribeCognitoUserPoolClient",
"path": "ApplicationStack/userPoolClient/DescribeCognitoUserPoolClient",
"children": {
"Provider": {
"id": "Provider",
"path": "ApplicationStack/userPoolClient/DescribeCognitoUserPoolClient/Provider",
"constructInfo": {
"fqn": "aws-cdk-lib.aws_lambda.SingletonFunction",
"version": "2.130.0"
}
}
}
}
}
By the way, did you update the cdk version in the package.json?
from stratospheric.
@giuliopulina Thanks for the pointer. Where did that code come from? I have a few guesses but am pretty new to AWS / CDK.
I hadn't updated package.json, but had updated the global version of cdk.
I just updated the version in package.json and ran npm update
. Then I tried to run the Cognito deployment app again, but got the same result.
I do suspect it's related to the creation of the UserPoolClient
since the error occurs right after this log statement is generated:
CREATE_IN_PROGRESS | AWS::IAM::Policy |
cognito/userPoolClient/DescribeCognitoUserPoolClient/CustomResourcePolicy
(userPoolClientDescribeCognitoUserPoolClientCustomResourcePolicy05AFFF63) Resource creation Initiated
Any other ideas?
from stratospheric.
@giuliopulina Thanks for the pointer. Where did that code come from? I have a few guesses but am pretty new to AWS / CDK.
I hadn't updated package.json, but had updated the global version of cdk.
I just updated the version in package.json and ran
npm update
. Then I tried to run the Cognito deployment app again, but got the same result.I do suspect it's related to the creation of the
UserPoolClient
since the error occurs right after this log statement is generated:CREATE_IN_PROGRESS | AWS::IAM::Policy | cognito/userPoolClient/DescribeCognitoUserPoolClient/CustomResourcePolicy (userPoolClientDescribeCognitoUserPoolClientCustomResourcePolicy05AFFF63) Resource creation Initiated
Any other ideas?
The code that I posted are from the Cloudformation templates generated from the "cdk synth" command, run in my local environment (specifically, tree.json file).
I have built a different version of the Stratospheric application using a different CDK structure, but the core is the same.
Just for my understanding, are you running your npm/cdk command from your local machine or from the CI (Github Actions)?
If, as I imagine are you running the commands from your local environment, I would suggest to try to run the following commands from your cdk folder:
- npm install
- npm list
(output should be like this)
-- [email protected]
- npm run cognito:deploy
Also, if you could put your project on Github, I think it could be helpful
from stratospheric.
Thanks for the explanation on the cdk synth
output; that was basically what I was thinking was happening.
I'm running the code from my local machine, not a GitHub action. When I run npm list
, I get:
[email protected] C:\Users\mcfal\source\imhere\imhere_server_deploy
└── [email protected]
So that seems correct.
Any other ideas of things to check for?
from stratospheric.
Thanks for the explanation on the
cdk synth
output; that was basically what I was thinking was happening.I'm running the code from my local machine, not a GitHub action. When I run
npm list
, I get:[email protected] C:\Users\mcfal\source\imhere\imhere_server_deploy └── [email protected]
So that seems correct.
Any other ideas of things to check for?
Unfortunately not many other ideas, without looking at the project :( if you could share it on a Github, that would surely help to figure out the issue.
The only thing that comes into my mind is to try to re-run 'npm bootstrap' with the new CDK because maybe there are some defaults that need to be overridden.
from stratospheric.
I tried re-running the bootstrap command, with no luck. At first it didn't want to do anything, so I deleted that stack. This caused a few problems but I was able to resolve them using the AWS console, and then re-bootstrap the CDK. Re-running npm rum cognito:deploy
caused an error at the same location.
My code is hosted on BitBucket rather than GitHub, but I've created a GitHub repo and pushed the code to [email protected]:ryanmcfall/cdk_deploy.git
. There's no value for the accountId
parameter in ckd.json
; obviously you'd need to change that / pass it on the command line to test anyway.
Any thoughts on this would be greatly appreciated!
from stratospheric.
Ok, I think I found the issue:
- your project depends on latest released version of stratospheric-dev/constructs (release 0.1.13).
- unfortunately, this version of stratospheric-dev/constructs contains a reference to aws-cdk version 2.43.1, that is a very old version and doesn't contain this commit that updates the default Node runtime for custom resources to v18.
This is causing the lambda functions to be generated with Node14 runtime, thus making your deployment fail.
I think the cleanest solution is to wait for the maintainers (@thombergs @BjoernKW @rieckpil) to release a new version of the project.
Temporarily, you can checkout the stratospheric-dev/constructs project locally, upgrade the cdk dependency to 2.130.0 version, build and install it in local maven repo and update your app to use the SNAPSHOT.
I also found a strange thing in cdk-constructs project: the latest release version is 0.1.13, but the current pom.xml version is 0.1.12-SNAPSHOT: it should be 0.1.14-SNAPSHOT.
from stratospheric.
Related Issues (20)
- ECS error log when npm run service:deploy HOT 3
- Tracing User Actions with Amazon DyanomoDB missing initialization HOT 2
- Collaborator - user not able to login to accepts the invite. HOT 6
- Bug in chapter 10 - "npm run service:deploy" includes more than a single stack HOT 3
- Bug Chapter 10 - The deployment of the ECS Service freeze HOT 1
- Readability: The transparent version of the Stratospheric Technical Architecture Image in the README.md is not readable on a dark mode background. Use the non-transparent image instead HOT 2
- Fix the answers for two questions in quizzes 1 and 6 HOT 2
- Let students restart the course and take the quizzes as many times as they like. HOT 5
- Build Issues on Mac M3 HOT 3
- Add information on required mapping of / HOT 2
- Container based on ActiveMQ image not starting in Windows 10 HOT 1
- local-aws-infrastructure.sh not invoked HOT 1
- Inconsistancy - Book contains legacy output declaration for GithubActions HOT 1
- Possible conflict between prerequisites and instructions in the appendix HOT 2
- micrometer-registry-cloudwatch2 should be used instead of micrometer-registry-cloudwatch? HOT 1
- Extend discussion of Todo app integration with Spring Boot to mobile app context for Cognito HOT 1
- Clarification on deploying multiple apps using same account HOT 1
- IAM role relationship diagram improvement HOT 2
- cdk init troubles
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stratospheric.