Open ppena-LiveData opened 10 months ago
NOTE: this race condition doesn't happen all the time. I reproduced the problem at least half a dozen times while writing up this ticket, but I just tried it a couple times, and the above code worked without a problem, which of course is very annoying and means this might be hard to fix.
Describe the feature
I might be doing something wrong, but I'm using aws_cognito.UserPoolEmail.withSes(), and no matter what I tried, I couldn't get CloudFormation to wait until a new
aws_ses.EmailIdentity
was ready before trying to find it to use it in a CognitoUserPool
.Use Case
I'd like to use a single CDK stack to create both an
aws_ses.EmailIdentity
and aaws_cognito.UserPool
that references the Simple Email Service'sEmailIdentity
. I'd also like to create anaws_ses.ReceiptRuleSet
in the same stack as theaws_ses_EmailIdentity
without having to add a lot ofaddDependency()
calls.Proposed Solution
If it's possible,
aws_cognito.UserPoolEmail.withSes
should allow anaws_ses.EmailIdentity
to be passed in to make sure any dependencies are properly configured. The same would also be nice for anses.ReceiptRuleSet
.Other Information
The below is what I tried, but no matter what
add_dependency()
calls I added, I couldn't get it to work with a single stack and had to split it up into two separate stacks. I kept getting errors like this:Here's the Python code:
Acknowledgements
CDK version used
2.117.0
Environment details (OS name and version, etc.)
Windows 11