Blenra
Optimized for: Gemini / ChatGPT / Claude

Advanced AI Prompt for AWS S3 Bucket Least-Privilege Policy Generation

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

Required Variables

  • [BUCKET_NAME]
  • [IAM_ROLE_ARN]
  • [ALLOWED_IP_RANGE]
  • [VPC_ID]
advanced-ai-prompt-aws-s3-least-privilege.txt
Act as a Senior Cloud Security Architect. Generate a JSON AWS S3 Bucket Policy for [BUCKET_NAME] that enforces strict least-privilege for [IAM_ROLE_ARN]. The policy must include conditions to restrict access exclusively to [ALLOWED_IP_RANGE] and require the request to originate from [VPC_ID]. Ensure the policy explicitly denies non-SSL requests and restricts actions to specific API calls (e.g., GetObject, PutObject) rather than using wildcards. Include comments explaining the security rationale for each statement.

Example Output

"The AI generates a robust JSON policy including 'aws:SourceIp' and 'aws:sourceVpc' conditions with a specific 'Deny' statement for any non-HTTPS traffic."