I have a multi-account strategy in AWS. All is deployed using the CDK. Each service has it's own account and I want to achieve this (recommended by this aws blog post):
- If I deploy the API account first, it needs the other account's lambda ARNs for integration, which are not yet created.
- If I deploy a service account first, it needs the API methods ARNs for giving them permission to invoke the lambdas.
I think this is kind of a "deadlock" situation and I can't figure it out.
Putting it in other words, how can I integrate, using the CDK, the API account's methods with lambdas from another account?
Thanks!