Inferensys

Prompt

Cloud Security Architecture Review Prompt

A practical prompt playbook for using Cloud Security Architecture Review Prompt in production AI workflows.
DevOps engineer deploying LLM to production on laptop, Kubernetes dashboards visible, late night deployment session.
PROMPT PLAYBOOK

When to Use This Prompt

Define the job, reader, and constraints for the Cloud Security Architecture Review Prompt.

This prompt is for cloud architects and security engineers who need to perform a structured control gap analysis on an AWS, Azure, or GCP architecture design before it reaches production. The job-to-be-done is turning a design document, infrastructure-as-code plan, or architecture diagram description into a provider-specific security assessment mapped to the shared responsibility model. The reader is expected to supply a detailed system design that includes IAM roles, network topology, encryption configuration, logging setup, and compliance requirements. Without this context, the prompt cannot produce a meaningful gap analysis.

Use this prompt when you have a concrete cloud design artifact and need to identify missing controls, misconfigurations, and compliance deviations before deployment. It is appropriate for pre-production security reviews, compliance preparation, and architecture decision record support. The prompt is designed to reason about provider-native services—AWS IAM policies, Azure RBAC, GCP service accounts—and flag gaps like overly permissive security groups, missing encryption at rest, or logging blind spots. It works best when the input includes the target compliance framework (e.g., SOC 2, PCI DSS, HIPAA) and the cloud provider, so the analysis can reference specific control requirements and service defaults.

Do not use this prompt for runtime incident response, live infrastructure auditing, or penetration test planning. It analyzes design documents, not running environments. It is not a substitute for a qualified security reviewer or a formal third-party audit. For high-risk regulated workloads, always route the output to a human security architect for validation. If the input design is incomplete or the provider is unspecified, the prompt will produce unreliable results. Pair this prompt with the 'Secrets Management Architecture Review Prompt' and 'Network Segmentation Analysis Prompt' for a comprehensive cloud security review, and always run the included eval checks to verify that provider-specific misconfigurations are flagged before accepting the output.

PRACTICAL GUARDRAILS

Use Case Fit

Where this prompt works and where it does not. Understand the fit before you wire it into a review pipeline.

01

Good Fit: Structured Architecture Documents

Use when: You have a written cloud architecture document, diagram description, or IaC plan that describes IAM roles, network topology, encryption settings, and logging configuration. The prompt performs best with explicit design artifacts rather than conversational brainstorming. Guardrail: Provide the document as [DESIGN_DOC] and specify the target cloud provider in [CLOUD_PROVIDER] to activate provider-specific control checks.

02

Bad Fit: Runtime Incident Response

Avoid when: You need real-time threat detection, live log analysis, or active incident triage. This prompt reviews static architecture designs, not running systems. Guardrail: Route runtime security events to a SIEM or detection pipeline. Use this prompt during design review gates, not on-call rotations.

03

Required Inputs: Provider, Scope, and Controls Baseline

Risk: Without specifying [CLOUD_PROVIDER], [SCOPE], and [COMPLIANCE_FRAMEWORK], the prompt produces generic advice that misses provider-specific misconfigurations and compliance gaps. Guardrail: Always populate these three placeholders. If no compliance framework applies, explicitly set it to 'none' to prevent the model from inventing requirements.

04

Operational Risk: Shared Responsibility Confusion

Risk: The prompt may flag controls that are the cloud provider's responsibility as customer gaps, or vice versa, especially for managed services with unclear boundaries. Guardrail: Include a [SHARED_RESPONSIBILITY_CONTEXT] field that clarifies which layers the customer owns. Review all findings against your provider's published shared responsibility model before accepting them.

05

Operational Risk: Stale Compliance Mapping

Risk: The model's knowledge of compliance frameworks (SOC 2, PCI DSS, HIPAA, ISO 27001) may lag behind current requirements. It can map controls to outdated or incorrect framework sections. Guardrail: Treat framework mappings as suggestions, not audit evidence. Cross-reference findings with the current published framework before including them in compliance reports.

06

Not a Replacement for Penetration Testing

Risk: Teams may treat the prompt's output as equivalent to a security assessment. The prompt identifies architectural control gaps but cannot discover implementation bugs, misconfigurations in running systems, or novel attack paths. Guardrail: Use this prompt as a design-stage filter. Follow up with static analysis of IaC, dynamic testing, and manual review before production deployment.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A reusable prompt template for conducting a cloud security architecture review, ready to be copied and adapted with your specific design documents and provider context.

This prompt template is designed to be the core instruction you send to a frontier model when you need a structured, provider-specific security gap analysis of a cloud architecture. It assumes you have a design document, diagram description, or Infrastructure-as-Code (IaC) plan as your primary input. The template uses square-bracket placeholders that you must replace with concrete values before execution. Do not leave any placeholders unresolved in a production system; doing so will cause the model to hallucinate or default to generic, unhelpful advice.

text
You are a senior cloud security architect. Your task is to perform a rigorous security review of the provided cloud architecture design, strictly mapped to the shared responsibility model of [CLOUD_PROVIDER].

## Input
[ARCHITECTURE_DESIGN_DOCUMENT]

## Review Constraints
- Provider: [CLOUD_PROVIDER] (must be one of AWS, Azure, GCP)
- Compliance Framework: [COMPLIANCE_FRAMEWORK] (e.g., SOC 2, PCI DSS, HIPAA, none)
- Risk Appetite: [RISK_LEVEL] (must be one of Low, Moderate, High)
- Focus Areas: [FOCUS_AREAS] (e.g., IAM, Network, Encryption, Logging, Compute, all)

## Output Schema
Return a single valid JSON object with the following structure:
{
  "summary": "A one-paragraph executive summary of the most critical findings.",
  "shared_responsibility_analysis": {
    "provider_responsibilities": ["List of controls the provider manages"],
    "customer_responsibilities": ["List of controls the customer must implement"],
    "gaps": ["List of controls that are unclear or unassigned"]
  },
  "findings": [
    {
      "id": "F-001",
      "severity": "Critical|High|Medium|Low",
      "category": "IAM|Networking|Encryption|Logging|Compute|Compliance",
      "title": "Short finding title",
      "description": "Detailed description of the misconfiguration or missing control",
      "resource": "Specific resource or service affected",
      "recommendation": "Actionable remediation step",
      "reference": "Link to [CLOUD_PROVIDER] best practice or [COMPLIANCE_FRAMEWORK] control ID"
    }
  ],
  "compliance_mapping": [
    {
      "control_id": "String from [COMPLIANCE_FRAMEWORK]",
      "status": "Compliant|Non-Compliant|Not Applicable",
      "evidence": "How the design meets or fails the control"
    }
  ],
  "risk_score": 0-100,
  "next_steps": ["Prioritized list of 3-5 immediate actions"]
}

## Instructions
1. Analyze the design against [CLOUD_PROVIDER] Well-Architected Framework security pillar.
2. Identify misconfigurations, missing controls, and deviations from least privilege.
3. Map every finding to a specific resource or service in the design.
4. For each finding, provide a concrete, actionable recommendation, not generic advice.
5. If [COMPLIANCE_FRAMEWORK] is provided, map findings to specific control IDs.
6. If the design document is incomplete, note assumptions and flag missing information as a finding.
7. Do not invent resources or services not present in the design.

To adapt this template, start by replacing the placeholders with concrete values. For [ARCHITECTURE_DESIGN_DOCUMENT], paste the full text of your design, diagram description, or IaC plan. For [CLOUD_PROVIDER], use the exact string "AWS", "Azure", or "GCP" to trigger provider-specific reasoning. The [FOCUS_AREAS] placeholder can be a comma-separated list or the string "all". If no compliance framework applies, set [COMPLIANCE_FRAMEWORK] to "none" and the model will skip the compliance mapping section. The output schema is strict JSON; you should validate it against this schema in your application harness before surfacing results to a user. For high-risk production reviews, always route the final output to a human security architect for approval before acting on any remediation steps.

IMPLEMENTATION TABLE

Prompt Variables

Required inputs for the Cloud Security Architecture Review Prompt. Each placeholder must be populated before execution to ensure a reliable, provider-specific control gap analysis.

PlaceholderPurposeExampleValidation Notes

[ARCHITECTURE_DOCUMENT]

Full text of the cloud architecture design, including diagrams described in text, service lists, and configuration notes

A markdown document describing a multi-account AWS setup with VPC peering, IAM roles, and KMS key policies

Must be non-empty and contain at least one cloud service reference. Reject if under 200 characters or missing service identifiers.

[CLOUD_PROVIDER]

Target cloud platform for control mapping and shared responsibility alignment

aws

Must match one of: aws, azure, gcp. Case-insensitive. Reject unknown providers and request clarification.

[COMPLIANCE_FRAMEWORKS]

List of applicable compliance standards to check controls against

SOC 2, ISO 27001, PCI DSS

Must be a comma-separated list. Validate each framework against a known registry. Flag unrecognized frameworks for human confirmation before proceeding.

[DATA_CLASSIFICATION]

Highest sensitivity level of data processed or stored in the architecture

PII and payment card data

Must be one of: public, internal, confidential, restricted, PII, PHI, PCI. If multiple, list primary. Reject null or empty values.

[DEPLOYMENT_MODEL]

Service deployment model affecting shared responsibility boundary evaluation

IaaS with customer-managed Kubernetes

Must be one of: saas, paas, iaas, on-premises, hybrid, serverless, kubernetes. Controls mapping depends on this value.

[TRUST_ZONES]

Number and names of distinct trust zones in the architecture

3: public-ingress, application, data

Must be an integer count followed by colon-separated names. Validate count matches zone list length. Flag single-zone architectures for blast-radius review.

[EXISTING_CONTROLS]

Security controls already implemented, to avoid flagging known mitigations as gaps

AWS WAF on public ALB, VPC flow logs enabled, KMS CMK for RDS encryption

Can be empty string if no controls documented. If provided, each control must reference a specific service or configuration. Parse and deduplicate before gap analysis.

[REVIEW_SCOPE]

Boundary of the review to prevent scope creep into unrelated systems

Production payment processing pipeline only

Must be a non-empty string defining explicit boundaries. Reject overly broad scopes like 'everything'. Use to filter control checks to relevant services.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Cloud Security Architecture Review Prompt into a reliable application workflow with validation, retries, and human review gates.

This prompt is designed to be embedded in a security review pipeline, not used as a one-off chat. The implementation harness must enforce provider-specific validation, handle the shared responsibility model correctly, and ensure that every finding is traceable to a control framework. Because cloud misconfigurations are a leading cause of security incidents, the harness should treat the model's output as a draft analysis that requires structured validation before it reaches an architect or auditor.

Wire the prompt into an application by first assembling the required inputs: the architecture document or diagram description, the target cloud provider (AWS, Azure, or GCP), the applicable compliance frameworks, and the risk tolerance level. The application layer should pre-process the architecture description to extract service names, resource types, and trust boundaries before passing them into the prompt as structured context. After the model responds, run a provider-specific validator that checks for known misconfiguration patterns—for example, S3 bucket policies with Principal: *, Azure NSG rules with 0.0.0.0/0, or GCP service accounts with overly broad IAM roles. If the validator flags issues, append the validation errors to the original prompt context and request a targeted re-review of only the flagged resources. Log every prompt version, input hash, model response, and validator result for auditability. For high-risk environments, route all findings through a human review queue before they appear in any dashboard or report.

Model choice matters here. Use a model with strong reasoning capabilities and a large context window, such as Claude 3.5 Sonnet or GPT-4o, because cloud architecture documents can be lengthy and the analysis requires cross-referencing multiple control families. Do not use a small or general-purpose model for this workflow—missed misconfigurations have direct security consequences. Set temperature to 0 or near-zero to maximize consistency across reviews. If your architecture documents exceed the model's context window, implement a chunking strategy that splits the document by service boundary or trust zone, review each chunk independently, and then run a synthesis pass that reconciles cross-boundary findings. The synthesis pass should flag any control gaps that span multiple chunks, such as a network ACL in one chunk that contradicts a security group rule in another.

The output schema should be strictly enforced. Define a JSON schema that includes arrays for findings, control gaps, compliance mappings, and remediation steps. Each finding must include a resource identifier, the specific misconfiguration, the control framework reference, and a severity rating. After the model responds, validate the JSON structure and retry up to two times if the output is malformed or missing required fields. On the second retry, include the schema validation errors in the prompt so the model can self-correct. If both retries fail, log the failure, flag the review as incomplete, and escalate to a human reviewer. Never silently accept a partial or malformed security review.

For teams integrating this into a CI/CD pipeline or architecture review platform, implement a caching layer that stores review results keyed by the hash of the architecture document and the prompt version. This prevents redundant reviews of unchanged architectures and reduces both cost and latency. When the architecture document changes, invalidate only the affected chunks and re-review them. Finally, build an eval harness that runs this prompt against a golden dataset of known cloud architectures with documented misconfigurations. Measure precision, recall, and false-positive rate on a per-provider basis. A prompt that misses S3 bucket misconfigurations but catches IAM issues is not ready for production—provider-specific eval coverage is non-negotiable.

IMPLEMENTATION TABLE

Expected Output Contract

Defines the structure, types, and validation rules for the cloud security architecture review output. Use this contract to parse, validate, and integrate the model's response into downstream security workflows.

Field or ElementType or FormatRequiredValidation Rule

control_gap_analysis

Array of objects

Schema check: each object must contain control_id, finding, severity, and mapped_shared_responsibility fields. Array must not be empty.

control_gap_analysis[].control_id

String (e.g., 'IAM-003')

Format check: must match pattern [A-Z]+-[0-9]+. Must be unique within the array.

control_gap_analysis[].severity

Enum: 'Critical', 'High', 'Medium', 'Low', 'Informational'

Enum check: value must be one of the allowed strings. No other values permitted.

control_gap_analysis[].mapped_shared_responsibility

Enum: 'Customer', 'Provider', 'Shared'

Enum check: value must be one of the allowed strings. If 'Provider', a human review flag must be raised.

provider_specific_misconfigurations

Array of objects

Schema check: each object must contain resource_type, misconfiguration, and provider fields. Array may be empty if no misconfigurations found.

provider_specific_misconfigurations[].provider

Enum: 'AWS', 'Azure', 'GCP'

Enum check: value must match one of the three providers. Cross-reference with [PROVIDER] input variable.

executive_summary

String (max 500 words)

Length check: must be between 50 and 500 words. Content check: must not contain unresolved placeholders or hallucinated compliance certifications.

review_timestamp

ISO 8601 datetime string

Format check: must parse as valid ISO 8601. If model cannot provide real timestamp, use null and flag for application-layer injection.

PRACTICAL GUARDRAILS

Common Failure Modes

Cloud security architecture reviews fail in predictable ways. These cards cover the most common failure modes when using LLMs for control gap analysis, why they happen, and how to prevent them before they reach production.

01

Provider-Generic Advice Without Service Mapping

What to watch: The model produces security recommendations that sound correct but reference services, features, or configuration options that don't exist in your cloud provider. An AWS-specific control mapped to an Azure service name is worse than no advice—it creates false confidence. Guardrail: Include the target provider and primary services in the prompt context. Add a post-generation validation step that checks every referenced service name against the provider's current service catalog. Flag any recommendation that can't be mapped to a documented provider capability.

02

Shared Responsibility Boundary Confusion

What to watch: The model blurs the line between cloud provider responsibilities and customer responsibilities, recommending controls that belong to the provider's side of the shared responsibility model or missing controls the customer must implement. This is especially common with managed services where the boundary shifts by service tier. Guardrail: Explicitly state the service model for each component in the prompt context. Add an eval check that classifies each recommended control as provider-managed, customer-managed, or shared, and flag any misattribution. Require human review for controls that straddle the boundary.

03

Missing IAM Condition Key and Policy Boundary Analysis

What to watch: The model identifies overly permissive IAM roles but misses missing condition keys, absent permission boundaries, or unscoped resource policies. It flags s3:* but not s3:GetObject without a s3:ResourceTag condition. The gap analysis is surface-level and misses the controls that actually prevent privilege escalation. Guardrail: Include explicit instructions to check for condition keys, permission boundaries, and resource-level policy scoping. Add eval criteria that require at least one condition-key or boundary-specific finding per IAM role reviewed. Use a checklist-based output schema that forces the model to address each dimension.

04

Encryption-in-Transit Overstatement Without Cipher Suite Detail

What to watch: The model reports that encryption-in-transit is present because TLS is configured, but doesn't check TLS version, cipher suite strength, certificate validation, or mutual TLS requirements. A system using TLS 1.0 with weak ciphers passes the review with a false clean bill of health. Guardrail: Require the prompt to enumerate TLS version, cipher suites, and certificate validation configuration for each data path. Add eval checks that flag any encryption finding that doesn't specify minimum TLS version and approved cipher suites. Include a specific output field for cryptographic inventory with version and algorithm details.

05

Logging Coverage Reported Without Log Integrity or Tamper Resistance

What to watch: The model confirms that logging is enabled for services but doesn't evaluate whether logs are immutable, centrally aggregated, protected from deletion by compromised credentials, or complete enough for forensic investigation. Logging exists but isn't useful for incident response. Guardrail: Add explicit prompt instructions to evaluate log integrity controls, tamper resistance, centralized aggregation, and retention policies. Include eval criteria that require findings on log immutability, cross-account log replication, and deletion protection. Flag any logging finding that only checks enablement status.

06

Network Segmentation Analysis That Ignores East-West Traffic

What to watch: The model focuses on perimeter controls like security groups and WAF rules but misses east-west traffic between services within the same VPC or cluster. Lateral movement paths between application tiers, data stores, and management planes go unreviewed. Guardrail: Include explicit instructions to analyze service-to-service communication paths, not just ingress from external sources. Add eval checks that require findings on internal network segmentation, service mesh policies, or namespace isolation. Use a trust-boundary mapping output field that forces the model to enumerate every cross-service path.

IMPLEMENTATION TABLE

Evaluation Rubric

Use this rubric to test the Cloud Security Architecture Review Prompt before shipping. Each criterion targets a known failure mode in provider-specific control gap analysis. Run these checks against a representative set of architecture documents and record pass/fail results.

CriterionPass StandardFailure SignalTest Method

Shared Responsibility Boundary

Output explicitly separates provider responsibilities from customer responsibilities for each control gap

Gaps are listed without mapping to the shared responsibility model or provider controls are incorrectly assigned to the customer

Parse output for a responsibility assignment field per finding; verify against provider documentation for 5 known control areas

Provider-Specific Control Mapping

Every finding references the correct cloud provider's native service or feature name

Generic security terms used instead of provider-specific names or wrong provider service referenced

Extract all service references; validate against provider API and service catalogs; flag any generic term like 'firewall' without provider context

Control Gap Severity Classification

Each gap includes a severity rating with clear criteria based on exploitability and blast radius

All gaps rated the same severity, severity missing, or severity not justified by evidence in the architecture document

Check that severity distribution varies across findings; verify at least one HIGH finding references blast radius or exploitability rationale

Compliance Framework Cross-Reference

Findings map to relevant compliance controls where applicable

Compliance references are hallucinated, irrelevant, or missing for regulated workloads

Cross-reference cited compliance controls against official framework documentation; flag any control ID that does not exist in the referenced framework

Network Segmentation Finding Accuracy

Network findings correctly identify overly permissive rules with specific CIDR, port, or security group references

Network findings are vague or recommend restrictions that would break documented application dependencies

For each network finding, verify the cited rule exists in the input document and the recommendation does not conflict with documented required flows

IAM Least-Privilege Analysis

IAM findings identify specific over-provisioned roles or policies with concrete least-privilege alternatives

IAM findings are generic or recommend removing permissions required by documented workload functions

Trace each IAM finding to a specific role or policy in the input; verify the recommended restriction does not break a documented workload requirement

Encryption Coverage Completeness

Findings cover encryption at rest and in transit across all data stores and service boundaries in the input

Encryption gaps missed for documented data stores or findings recommend encryption for services that do not support it

Inventory all data stores and service boundaries from the input document; verify each has a corresponding encryption assessment in the output

Logging and Audit Trail Gaps

Findings identify specific log sources, audit trails, or monitoring gaps with concrete enablement recommendations

Logging findings are generic or recommend logging that the provider does not support for the cited service

Verify each logging finding references a log source or audit capability that exists in the provider's documentation for the cited service

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Use the base prompt with a single cloud provider and a simplified architecture diagram description. Drop the compliance framework mapping and focus on the top 5 control gaps. Replace the structured output schema with a free-text summary to iterate faster.

code
Review this [AWS/Azure/GCP] architecture for the top 5 IAM, network, and encryption control gaps. Focus on misconfigurations, not missing features. Output as bullet points.

Architecture: [ARCHITECTURE_DESCRIPTION]

Watch for

  • Missing provider-specific service names in the response
  • Overly broad recommendations that ignore the shared responsibility model
  • No distinction between control-plane and data-plane findings
Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.