Blenra
Optimized for: Gemini / ChatGPT / Claude

Advanced AI Prompt for CI/CD Deployment Role with iam:PassRole Restrictions

Use this engineered prompt to drastically optimize your workflow and output.

Required Variables

  • [DEPLOYMENT_ROLE_ARN]
  • [LAMBDA_ROLE_ARN]
  • [TARGET_REGION]
advanced-ai-prompt-cicd-iam-passrole.txt
Construct an IAM policy for a CI/CD deployment user [DEPLOYMENT_ROLE_ARN]. The policy should allow the user to create and update Lambda functions in [TARGET_REGION]. Critically, restrict the 'iam:PassRole' action so the user can only pass the specific role [LAMBDA_ROLE_ARN] to the Lambda service. Use a 'Condition' to ensure the 'iam:PassedToService' is 'lambda.amazonaws.com'.

Example Output

"The AI produces a JSON policy that prevents 'privilege escalation' by limiting which roles the CI/CD pipeline can assign to resources."