Security as one lens
Emfirge is the harness between your AI agent and cloud: fork the infrastructure graph, model a proposed change, and inspect its consequences across the documented lenses before production. Security and reachability are one lens; read-only IAM access, scoped trust, temporary credentials, deterministic analysis, and revocation keep that lens bounded.
The role
Emfirge reads through a read-only IAM role you own and control, with no write permissions. Hosted users receive their own ExternalId from emfirge_setup; self-host deployments must set EMFIRGE_EXTERNAL_ID on the server and in the MCP environment. There is no default, and scans refuse to run without it. The role includes two read-only CloudWatch permissions (GetMetricStatistics and GetMetricData) for in-use evidence, and two IAM Access Analyzer permissions (CheckNoPublicAccess and ValidatePolicy) used only by opt-in policy checks. Roles made with the old shared ExternalId must be redeployed. Delete the CloudFormation stack to revoke access.
Set it up
Ask your assistant for setup help, open the pre-filled CloudFormation URL, acknowledge the IAM-resources checkbox, create the stack (about 30 seconds), and copy RoleArn from Outputs before scanning.
Deterministic backend
Scanning, rules, graph analysis, and verify-fix are pure computation: the same input produces the same output. Prose summaries are the only place a model is used, never inside the MCP path.
Retention and errors
No backend-enforced scan-data retention period is documented. The CLI can request immediate deletion; presigned report URLs expire after one hour, which is separate from scan-data retention. A 403 usually means trust or ExternalId, a 404 means the analysis was not found, and a 429 means the default limit of 5 scans per account per local calendar day (override with DAILY_SCAN_LIMIT).
Exact role permissions and trust
Setup creates a role with AWS's managed SecurityAudit policy plus a small set of extra read permissions. It has no write permissions of any kind. Hosted users receive their own ExternalId from emfirge_setup; self-host deployments must set EMFIRGE_EXTERNAL_ID on the server and in the MCP environment. There is no default, and scans refuse to run without it. The role includes two read-only CloudWatch permissions (GetMetricStatistics and GetMetricData) for in-use evidence, and two IAM Access Analyzer permissions (CheckNoPublicAccess and ValidatePolicy) used only by opt-in policy checks. Roles made with the old shared ExternalId must be redeployed. The role trust prevents confused-deputy attacks and is scoped so only Emfirge's AWS account (000000000000) can assume it.
- Read-only, zero write permissions.
- STS credentials are temporary, expire after one hour, and are never stored.
- Delete the CloudFormation stack for instant revoke.
Setup steps
Ask your assistant ‘help me set up Emfirge’ for a pre-filled deploy link. Open it in AWS, tick the IAM-resources checkbox and create the stack (about 30 seconds), copy RoleArn from Outputs (it starts arn:aws:iam::), and give the ARN back to your assistant so the scan runs.
Retention and errors
Scanning, rules, graph analysis, and verify-fix are deterministic pure computation; prose summaries are the only model-generated part and never run inside the MCP path. npx @emfirge/mcp purge --role-arn <ARN> wipes server-side scan data and local token mappings immediately; no retention period is promised.
403 means access denied: check trust policy and ExternalId. 404 means the analysis_id was not found: run emfirge_scan first. 429 means the default limit of 5 scans per account per local calendar day (override with DAILY_SCAN_LIMIT) was reached; it resets with the local calendar day.
| HTTP code | Meaning |
|---|---|
| 403 | Access denied; check trust policy and your project ExternalId from emfirge_setup. |
| 404 | analysis_id not found; run emfirge_scan first. |
| 429 | Daily limit of 5 scans per account; resets by local calendar day. |