AWS CDK: ‘Bucket named X exists, but not in account Y. Wrong account?’
So you’re trying to deploy a cdk app and you come across
Bucket named X exists, but not in account Y. Wrong account?'
The error message is misleading.
The issue thread on Github points out that the direct cause of this error is a lack of permissions, and not exactly being in the wrong account (which can lead to a lack of permissions).
So, the cause is insufficient s3 permissions. Ensure that the relevant role has sufficient s3…