Disable cross account access

Hi I notice that local stack default enable cross account access. But I want to not cross account access for testing. How could I do that? Thanks!

Hi @sqqq, it is not possible to disable cross-account access.

You could perhaps force set AWS_ACCESS_KEY_ID to a particular account ID in your environment to ensure that only that account is used.

You could also look into IAM enforcement and see if it suits your use-case.

yes, I am using different AWS_ACCESS_KEY_ID.
The problem is in CMEK/KMS scenario, I want act as a KMS key from Customer account.
which should not be able access by other account until the policy been setup.