Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CDK keeps waiting for the stack to deploy even when the bootstrapper failed #89

Open
emileten opened this issue Nov 28, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@emileten
Copy link
Contributor

The way the database deployment works is :

  1. Create an RDS instance
  2. Create a lambda with the runtime code that creates the pgstac mechanism in that RDS instance
  3. Create a 'custom resource', aka a one-time trigger for that lambda that happens at deployment time.

(3) happens during the deployment. However, if it fails, the CDK doesn't catch the error, but doesn't consider the deployment finished either, and keeps waiting that the stack finishes deploying until we hit the time limit.

@emileten emileten added the bug Something isn't working label Nov 28, 2023
@vincentsarago
Copy link
Member

I'm interested in this because I've hit that so many time

The simplest solution I found was to test the handler using pytest https://github.com/developmentseed/eoAPI/blob/main/infrastructure/aws/tests/test_bootstrap.py

@emileten
Copy link
Contributor Author

emileten commented Nov 29, 2023

The simplest solution I found was to test the handler using pytest

👍

Some errors show up only when it runs in the lambda though...

I would be surprised there is no way to quickly link the lambda error to a cloudformation error. This seems related aws/aws-cdk#20933.

@vincentsarago
Copy link
Member

Some errors show up only when it runs in the lambda though...

Sure

aws/aws-cdk#20933 (comment) this comment seems interesting but maybe overkill

@vincentsarago
Copy link
Member

@emileten
Copy link
Contributor Author

Just noting that I saw somewhere recently, we may also be able to just add/change the time out of the custom resource.

Maybe by using Provider in here? Not sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants