Using Console
Using CLI
policy.json
.
policy.json
file to remove the cross-account access. The policy should look something like this:
<your-account-id>
, <region>
, and <queue-name>
with your account ID, the AWS region, and the queue name respectively.Using Python
~/.aws/credentials
, which should look like:
MODIFY_CURRENT_POLICY_TO_REMOVE_CROSS_ACCOUNT_ACCESS
placeholder in the script needs to be replaced with the actual logic to modify the policy, which depends on the specifics of the current policy.Also, be aware that modifying the policy in a way that removes necessary permissions can break the functionality of applications that depend on this SQS queue. Always make sure to understand the implications of policy changes before applying them.