Optimized for: Gemini / ChatGPT / Claude
Advanced AI Prompt for Cross-Account IAM Trust Relationship Setup
Use this engineered prompt to drastically optimize your workflow and output.
Required Variables
- ✦
[TRUSTING_ACCOUNT_ID] - ✦
[TRUSTED_ACCOUNT_ID] - ✦
[EXTERNAL_ID] - ✦
[ROLE_NAME]
advanced-ai-prompt-cross-account-iam-trust.txt
Design a highly secure IAM Trust Relationship policy for a role named [ROLE_NAME] in account [TRUSTING_ACCOUNT_ID]. This role should only be assumable by account [TRUSTED_ACCOUNT_ID]. Implement a mandatory [EXTERNAL_ID] check to prevent the 'Confused Deputy' problem. Additionally, include a condition that restricts the assumption of this role to a specific MFA-authenticated session. Format the output as a valid JSON IAM trust policy statement.
Example Output
"The output provides a trust policy JSON containing a 'sts:AssumeRole' action with a 'StringEquals' condition for the ExternalId and a 'MultiFactorAuthPresent' check."