feat: add chunked uploads for large stack payloads @milldr (#2251)
## WhatAdd automatic chunking for large stack/instance upload payloads to Atmos Pro. When payloads exceed the configurable threshold (default 4MB), the CLI splits the array into chunks and sends them sequentially with batch metadata (batch_id, batch_index, batch_total).
Why
Large infrastructure repos generate affected stack and instance payloads that exceed Vercel's ~4.5MB serverless body size limit, producing HTTP 413 Request Entity Too Large errors. The existing StripAffectedForUpload() reduces payloads by 70-75% but is insufficient for repos with hundreds of stacks.
Changes
- New
pkg/pro/chunked_upload.go— generic chunking logic (sendChunked,splitSlice,metadataOverhead) - Updated
UploadAffectedStacks()andUploadInstances()to use chunked upload - Added
batch_id,batch_index,batch_totalfields to upload DTOs - Switched from indented to compact JSON for upload payloads (~30% smaller)
- Added
max_payload_bytesconfig tosettings.proin atmos.yaml - Backward compatible: small payloads send without batch fields, old servers ignore unknown fields
Ref
Companion server-side PR: cloudposse-corp/apps (feat/chunked-stack-uploads → staging)
Summary by CodeRabbit
-
New Features
- Large stack and instance uploads now auto-split into multiple requests when exceeding a configurable threshold (default 4MB).
- Added configurable upload limit via atmos.yaml (settings.pro.max_payload_bytes).
- Chunked uploads include batch metadata (batch_id, batch_index, batch_total) for reliable reassembly; small payloads remain single-request and backward compatible.
- Upload payloads use compact JSON serialization to reduce size.
-
Documentation
- New blog post and roadmap entry describing chunked upload behavior and configuration.
-
Tests
- Added unit and integration tests validating chunking, batching, and error handling.
feat: introduce Gists as community-contributed recipes @osterman (#2238)
## what- Introduced Gists — a new content type for community-contributed recipes that demonstrate creative combinations of Atmos features (Custom Commands, Auth, Toolchain, etc.)
- Added a
GistDisclaimerReact component (purple/violet pill) that displays on all gist pages: "Gists are examples that demonstrate a concept, but are not actively maintained and may not work in your environment or current versions of Atmos without adaptations." - Extended the file-browser plugin with a
disclaimeroption, enabling a second plugin instance at/gistsalongside the existing/examples - Added "Gists" to the top navbar between Examples and Community
- Created the first gist: MCP with AWS — a masterclass in combining Custom Commands + Auth + Toolchain to run 21 AWS MCP servers with automatic credential management (sourced from
cloudposse/infra-livePR #1662) - Added a blog post announcing the Gists feature
- Added a
gist-creatorClaude agent for standardizing future gist creation
why
- Community members share creative Atmos patterns that don't fit the maintained examples model — they need a home that sets the right expectations
- The MCP with AWS recipe demonstrates the composability of Atmos features (the key insight:
atmos auth execwraps MCP server processes with authenticated AWS credentials) - Having a standardized gist structure and agent makes it easy to add more recipes over time
references
- Source material for first gist: https://github.com/cloudposse/infra-live/pull/1662
Summary by CodeRabbit
-
New Features
- Introduced Gists — a community-contributed recipe space for Atmos.
- Added an AWS MCP gist with install/start/test commands and many preconfigured AWS services and startup presets.
- Added toolchain alias and minimal Atmos config to enable gists.
- Exposed Gists in the site file browser at /gists with a configurable disclaimer and navbar link.
- Added Mermaid diagram support and a reusable Gist disclaimer UI component and styles.
-
Documentation
- Published blog post introducing Gists and contribution guidelines.
- Added gist README templates, registration guidance, required README structure, and a verification checklist.
feat: add ambient credential support for IRSA, IMDS, and ECS task roles @osterman (#2254)
## what- Adds two new auth identity kinds:
ambient(cloud-agnostic passthrough) andaws/ambient(AWS SDK default credential chain) ambientis a pure do-nothing passthrough that preserves the environment unchangedaws/ambientresolves credentials via the default AWS SDK chain (env vars → shared config → IRSA → IMDS → ECS task role) and supports chaining withaws/assume-role- Unlike other AWS identities,
aws/ambientdoes not clear credential env vars or disable IMDS
why
- Atmos currently explicitly disables IMDS (
AWS_EC2_METADATA_DISABLED=true) and clears IRSA env vars inPrepareEnvironment(), blocking use of infrastructure-provided credentials - Running Atmos in EKS pods (IRSA), EC2 instances (instance profiles), ECS tasks, or CI runners with pre-configured roles required workarounds
- This makes ambient/infrastructure-provided credentials a first-class auth path, including support for chaining
aws/ambient→aws/assume-rolefor cross-account access
references
- PRD:
docs/prd/ambient-identity.md - Blog:
website/blog/2026-03-25-ambient-credential-support.mdx - Example config:
examples/config-profiles/profiles/eks/auth.yaml - Docs: Updated
website/docs/stacks/auth.mdxwith ambient identity examples - Roadmap: Updated
website/src/data/roadmap.jswith shipped milestone
Summary by CodeRabbit
-
New Features
- Ambient credential support:
ambient(cloud-agnostic passthrough preserves environment) andaws/ambient(resolves AWS credentials via the SDK default provider chain; can be used standalone or chained for cross-account assume-role).
- Ambient credential support:
-
Documentation
- Added PRD, expanded docs, examples, blog post, and roadmap entry with EKS IRSA, EC2 instance profile, ECS task role, and chaining examples.
-
Tests
- Added comprehensive unit and integration tests covering ambient behaviors, region handling, credential flows, and chain construction.
🚀 Enhancements
fix: prevent IRSA credentials from overriding Atmos-managed credentials on EKS pods @osterman (#2143)
## what- Prevent IRSA/pod-injected AWS env vars from overriding Atmos-managed credentials in subprocess execution
- Pass
os.Environ()throughPrepareShellEnvironmentto sanitize it (delete problematic vars), then pass the sanitized env to subprocess viaWithBaseEnv— avoiding re-readingos.Environ()which would reintroduce IRSA vars - Add
SanitizedBaseEnvfield toConfigAndStacksInfoto carry sanitized environment through the hooks→terraform/helmfile/packer pipeline - Add
WithBaseEnvvariadic option toExecuteShellCommandfor backward-compatible sanitized env injection - Fix
auth execandauth shellto use sanitized env directly instead of re-readingos.Environ()
why
On EKS pods with IRSA (IAM Roles for Service Accounts), the pod identity webhook injects AWS_WEB_IDENTITY_TOKEN_FILE, AWS_ROLE_ARN, and AWS_ROLE_SESSION_NAME into the pod environment. When using Atmos auth on ARC (Actions Runner Controller), these IRSA vars leaked into terraform subprocesses because three code paths re-read os.Environ() after auth sanitization:
- Hooks path (terraform/helmfile/packer):
authenticateAndWriteEnvonly passedComponentEnvSection(stack YAML vars) toPrepareShellEnvironment— IRSA vars weren't in the input sodelete()was a no-op. ThenExecuteShellCommandre-reados.Environ()as the base. auth exec:executeCommandWithEnvre-reados.Environ()to build subprocess env.auth shell:ExecAuthShellCommand→MergeSystemEnvSimpleWithGlobalre-reados.Environ().
AWS SDK credential chain gives web identity tokens higher precedence than shared credential files, so the pod's runner role was used instead of the Atmos-managed tfplan role, causing AccessDenied errors.
Approach
Instead of setting cleared vars to empty string (which pollutes the subprocess env), we pass a clean, sanitized environment:
authenticateAndWriteEnvnow passesos.Environ()+ComponentEnvSectiontoPrepareShellEnvironment, which deletes problematic keys- The sanitized result is stored as
SanitizedBaseEnvonConfigAndStacksInfo ExecuteShellCommandacceptsWithBaseEnv(info.SanitizedBaseEnv)to use the sanitized env instead of re-readingos.Environ()auth execandauth shellpass sanitized env directly to subprocess, bypassing the re-read
references
Fixes credential precedence conflict where IRSA vars override Atmos-managed credentials on EKS pods running ARC (DEV-4216)
Summary by CodeRabbit
-
Bug Fixes
- Prevented AWS IRSA env vars from leaking into subprocesses by sanitizing auth-related variables (overridden with empty values) so spawned commands use Atmos credentials.
- Ensured credential-chain caching no longer skips the final role, forcing proper re-authentication when needed.
-
Refactor
- Preserve and propagate a sanitized environment end-to-end for shell/exec paths so child processes receive the corrected env list.
-
Tests
- Updated and added tests to validate env sanitization and subprocess propagation.
-
Documentation
- Added guidance describing the credential-chain caching fix and expected behavior.