Documentation for apcdeploy, served by apcdeploy context for AI assistants and the humans directing them.
apcdeploy is a declarative CLI tool for managing AWS AppConfig deployments. It allows you to manage AppConfig applications, configuration profiles, and environments as "code" using a YAML configuration file (apcdeploy.yml).
- List available AWS AppConfig resources (
ls-resources) - Auto-generate configuration files from existing AWS AppConfig resources (
init) - Deploy configuration changes (
run) - Compare differences between local files and deployed configurations (
diff) - Monitor deployment status (
status) - Retrieve deployed configurations (
get) - Sync local files with deployed configurations (
pull) - Validate local configuration data against its schema without deploying (
validate) - Stop ongoing deployments (
rollback) - Edit deployed configuration directly in
$EDITORand deploy (edit) - Print this document (
context)
- Supports AWS AppConfig hosted configuration store only
- AppConfig resources (applications, configuration profiles, environments, deployment strategies) must be created in AWS beforehand. This tool manages existing resources and does not create them.
- All commands except
contextrequire AWS credentials resolved via the standard AWS SDK chain (env vars, shared config, IAM role, etc.). - Hosted configuration size limit: 2 MB by default, 4 MB max (limit-increase request);
apcdeploy run/editvalidate this client-side.
- JSON (
.jsonfiles) — automatic validation and formatting - YAML (
.yaml/.ymlfiles) — automatic validation and formatting - Plain Text (
.txtor other extensions) — deployed as-is
For FeatureFlags profiles (JSON or YAML), the metadata fields _createdAt and _updatedAt are automatically excluded from diff/idempotency comparisons.
These commands prompt interactively when stdin is a TTY. In non-interactive environments (CI/CD, AI agents) supply the bypass listed below; otherwise the command exits with interactive mode requires a TTY: ….
| Command | Trigger | Bypass |
|---|---|---|
init |
resource selection prompts | supply all of --region, --app, --profile, --env |
get |
cost confirmation prompt (Data API is billable) | --yes |
rollback |
deployment-stop confirmation | --yes |
edit |
$EDITOR invocation |
none — there is no non-interactive mode. AI agents should use pull → edit file → run instead. |
run, diff, status, pull, validate, ls-resources, context do not require a TTY.
The flows below show the canonical command sequence for each scenario. Where a step says "edit the data file", AI agents should make programmatic edits (Write/Edit tools); human users typically open the file in $EDITOR.
Starting from an existing AppConfig profile + environment with no apcdeploy.yml yet:
# 1. Discover resources
apcdeploy ls-resources --region us-west-2 --json # JSON for AI parsing
# or:
apcdeploy ls-resources --region us-west-2 # human-readable
# 2. Initialize (AI agents: pass all four flags; human users may omit them for prompts)
apcdeploy init --region us-west-2 --app my-app --profile my-profile --env production
# 3. Edit the generated data file (data.json / data.yaml / data.txt) as needed
# 4. Preview, deploy, monitor
apcdeploy diff -c apcdeploy.yml
apcdeploy run -c apcdeploy.yml
apcdeploy status -c apcdeploy.yml# Edit data file, then:
apcdeploy diff -c apcdeploy.yml
apcdeploy run -c apcdeploy.yml
apcdeploy status -c apcdeploy.yml # optional, to inspect rolloutFor CI/CD, gate the deploy step on apcdeploy diff -c apcdeploy.yml --exit-nonzero --silent.
apcdeploy pull -c apcdeploy.yml # writes data file only if it differs
apcdeploy diff -c apcdeploy.yml # should now report no differences# Required: AppConfig application name
application: my-application
# Required: Configuration profile name
configuration_profile: my-config-profile
# Required: Environment name
environment: production
# Optional: Deployment strategy (default: AppConfig.AllAtOnce)
deployment_strategy: AppConfig.Linear
# Required: Path to configuration data file (relative or absolute)
# Relative paths are interpreted from apcdeploy.yml location
data_file: data.json
# Required: AWS region
region: us-west-2- Relative path (e.g.
data.json,config/data.json): resolved against the directory containingapcdeploy.yml. - Absolute path (e.g.
/home/user/configs/data.json): used as-is.
deployment_strategy accepts the name of any AWS pre-defined strategy (prefixed AppConfig.) or a custom strategy you have created in AppConfig. Discover what's available in the target region with:
apcdeploy ls-resources --region us-west-2 --show-strategies
# or:
aws appconfig list-deployment-strategiesCommon pre-defined strategies:
| Name | Behavior | Typical use |
|---|---|---|
AppConfig.Linear |
20% every 6 min over 30 min, 10 min bake | production (AWS recommended) |
AppConfig.Canary10Percent20Minutes |
exponential 10 % over 20 min | production (AWS recommended) |
AppConfig.AllAtOnce |
100 % immediately, no bake | hotfixes / dev |
AppConfig.Linear50PercentEvery30Seconds |
50 % every 30 s over 1 min | testing / demo |
All strategies (pre-defined and custom) integrate with CloudWatch Alarms for automatic rollback. See AWS AppConfig pre-defined strategies and creating custom strategies for details.
Lists AWS AppConfig resources (applications, configuration profiles, environments, and optionally deployment strategies) in a hierarchical view. Designed for AI agents and scripts to discover resources before running init. Read-only; does not require apcdeploy.yml.
apcdeploy ls-resources --region us-east-1| Flag | Description |
|---|---|
--region <region> |
AWS region. Uses AWS SDK default if omitted. |
--json |
Emit JSON to stdout. The human-readable view goes through Reporter primitives on stderr; combine with --silent for clean machine output. |
--show-strategies |
Include deployment strategies in the output. Off by default. |
Human-readable (with --show-strategies):
Region: us-east-1
Deployment Strategies:
- AppConfig.Linear (ID: e5f6g7h8)
Description: AWS Recommended deployment strategy for production environments
Deployment Duration: 30 minutes
Final Bake Time: 10 minutes
Growth Factor: 20.0%
Growth Type: LINEAR
Applications:
[1] my-app (ID: abc123)
Configuration Profiles:
- my-profile (ID: prof-123)
- feature-flags (ID: prof-456)
Environments:
- dev (ID: env-111)
- production (ID: env-222)
JSON (with --show-strategies):
{
"region": "us-east-1",
"applications": [
{
"name": "my-app",
"id": "abc123",
"configuration_profiles": [
{"name": "my-profile", "id": "prof-123"}
],
"environments": [
{"name": "production", "id": "env-222"}
]
}
],
"deployment_strategies": [
{
"name": "AppConfig.Linear",
"id": "e5f6g7h8",
"description": "AWS Recommended deployment strategy for production environments",
"deployment_duration_in_minutes": 30,
"final_bake_time_in_minutes": 10,
"growth_factor": 20,
"growth_type": "LINEAR"
}
]
}Without --show-strategies: the human view omits the Deployment Strategies: block; the JSON output keeps the key but emits "deployment_strategies": [].
0: success1: AWS error (credentials, region, throttling, etc.)
# Human-readable, with deployment strategies (use this before `init`)
apcdeploy ls-resources --region us-east-1 --show-strategies
# JSON for scripts/AI parsing (silent suppresses Reporter chatter on stderr)
apcdeploy ls-resources --region us-west-2 --json --silent > resources.json
# Pipe into jq to extract application names
apcdeploy ls-resources --region us-west-2 --json | jq -r '.applications[].name'Generates apcdeploy.yml and a configuration data file from existing AWS AppConfig resources. Does not create AWS resources — application, configuration profile, and environment must already exist.
apcdeploy init --region us-west-2 --app my-app --profile my-profile --env production| Flag | Description |
|---|---|
--region <region> |
AWS region. Interactive prompt if omitted (requires account:ListRegions IAM permission to enumerate regions). |
--app <name> |
Application name. Interactive prompt if omitted. |
--profile <name> |
Configuration profile name. Interactive prompt if omitted. |
--env <name> |
Environment name. Interactive prompt if omitted. |
-c, --config <path> |
Output config file path (default: apcdeploy.yml). |
-o, --output-data <path> |
Output data file path. Auto-determined from content type if omitted (data.json / data.yaml / data.txt). |
-f, --force |
Overwrite existing output files without confirmation. |
Partial flag specification is supported: any omitted flag triggers an interactive prompt for that field only. AI agents in non-interactive environments must supply all of --region, --app, --profile, --env.
- Resolve region (flag or interactive prompt; selected region's AWS Account ID is displayed)
- Resolve application (flag or interactive selection from the region's apps)
- Resolve configuration profile (flag or interactive selection from the app's profiles)
- Resolve environment (flag or interactive selection from the app's environments)
- Fetch the latest deployed configuration content and auto-detect Content-Type
- Generate
apcdeploy.ymland the data file (extension chosen from content type)
- Overwrite protection: existing
apcdeploy.ymlor data file is preserved unless-fis supplied. - IAM: when
--regionis supplied,account:ListRegionsis not required. The permission is only needed for the interactive region picker. - AI workflow: use
apcdeploy ls-resources --region <r> --jsonto discover names, then callinitwith all four flags. Fallback ifls-resourcesis unavailable: ask the user to provide application / profile / environment names.
0: success1: AWS error, file-overwrite refusal, or TTY error when prompts are needed without a TTY
# AI agent / CI workflow (non-interactive)
apcdeploy init --region us-west-2 --app my-app --profile my-profile --env production
# Fully interactive (human user)
apcdeploy init
# Custom output paths
apcdeploy init --region us-east-1 --app my-app --profile my-profile --env prod \
-c environments/prod/apcdeploy.yml -o environments/prod/data.json
# Overwrite existing files
apcdeploy init --region us-west-2 --app my-app --profile my-profile --env prod -fDeploys configuration changes to AWS AppConfig.
apcdeploy run -c apcdeploy.yml| Flag | Description |
|---|---|
--wait-deploy |
Wait until the deployment phase completes (transition to BAKING). Mutually exclusive with --wait-bake. |
--wait-bake |
Wait until the full deployment completes (DEPLOYING → BAKING → COMPLETE). Mutually exclusive with --wait-deploy. |
--force |
Deploy even when content is unchanged (bypasses auto-skip). |
--timeout <seconds> |
Timeout for deployment wait (default: 1800). Must be greater than 0. Shared across both phases when --wait-bake is used. |
--description <text> |
Description attached to the configuration version and deployment. Visible in the AppConfig console and in apcdeploy status output. Defaults to "Deployed by apcdeploy". Pass --description "" to clear. Maximum 1024 Unicode characters (counted by rune); rejected client-side when exceeded. |
- Load
apcdeploy.ymland thedata_file - Diff check: compare local file with the latest deployed version; if identical, skip (auto-skip, bypass with
--force) - Create a new hosted configuration version
- Start deployment to the specified environment
The diff check happens before any AWS write, so a no-op run produces no version and no deployment.
Idempotency: When the local file matches the deployed version, the command exits successfully without creating a version or deployment. For FeatureFlags profiles, the metadata fields _createdAt and _updatedAt are excluded from the comparison.
Wait flag comparison:
| Option | Wait until | Use |
|---|---|---|
| (none, default) | exits immediately after StartDeployment returns | check progress with status |
--wait-deploy |
DEPLOYING → BAKING transition | synchronous wait for rollout phase only |
--wait-bake |
DEPLOYING → BAKING → COMPLETE | synchronous wait for full lifecycle |
When --wait-bake is used, the deploy phase is rendered as a progress bar (AppConfig reports actual rollout %) and the bake phase as a spinner (bake is a monitoring window, not a quantified rollout). Both phases display a (~N min left) countdown derived from the strategy's DeploymentDurationInMinutes / FinalBakeTimeInMinutes. --timeout bounds the total wait (shared across both phases).
For AI assistants: prefer the no-wait default and poll with status. The --wait-* modes are intended for human operators.
| Cause | Resolution |
|---|---|
| Another deployment is in progress (DEPLOYING, BAKING, VALIDATING, or ROLLING_BACK) for the same environment | Wait for it to finish, or stop it with apcdeploy rollback -c apcdeploy.yml --yes. AppConfig allows only one active deployment per environment. |
| Wait timed out before the deployment reached the requested phase | Raise --timeout (e.g. AppConfig.Linear needs ≈ 30 min deploy + 10 min bake), or drop --wait-* and poll with apcdeploy status. |
0: success (including auto-skip when content is unchanged)1: general error (load, validation, AWS, or wait timeout)
# Basic deployment (recommended)
apcdeploy run -c apcdeploy.yml
# Deploy even when content is unchanged
apcdeploy run -c apcdeploy.yml --force
# Synchronous wait for full rollout (human operators)
apcdeploy run -c apcdeploy.yml --wait-bake --timeout 3900
# Attach a description
apcdeploy run -c apcdeploy.yml --description "ticket-123: tweak feature flag"Displays a unified diff between the local data file and the deployed configuration.
apcdeploy diff -c apcdeploy.yml| Flag | Description |
|---|---|
--exit-nonzero |
Exit with code 1 if differences exist (otherwise 0). For CI gating. |
- Normalization: JSON and YAML are normalized (indentation and line-break differences are absorbed); plain text is compared byte-for-byte. For FeatureFlags profiles,
_createdAtand_updatedAtare stripped before comparison. - In-progress deployments: when a deployment is
DEPLOYINGorBAKING, the diff is taken against that in-flight configuration. If that deployment is later rolled back (ROLLED_BACK), the diff output may not match the configuration that ends up deployed. - Output: lines prefixed
-are present in the deployed version,+lines are present locally. When the two match, the command printsNo differences foundand exits 0. - No prior deployment: when the configuration profile + environment has never been deployed, the local data is emitted as an "all-added" unified diff (every line
+prefixed) — semantically the would-be initial deployment payload. The command exits0(unlikepull/edit, which exit2in this state).
0: success — no differences, or--exit-nonzeronot set1: differences exist (only when--exit-nonzerois set), or general error
# Pre-deploy check
apcdeploy diff -c apcdeploy.yml
# CI guard: deploy only when changes are present
if apcdeploy diff -c apcdeploy.yml --exit-nonzero --silent; then
echo "No changes to deploy"
else
apcdeploy run -c apcdeploy.yml
fiDisplays the latest (or a specified) deployment's state, rollout progress, and metadata.
apcdeploy status -c apcdeploy.yml| Flag | Description |
|---|---|
--deployment <number> |
Show this specific deployment number. Defaults to the latest deployment for the configuration profile + environment. |
Displayed fields: deployment number, state, percentage complete, configuration version, start time.
State values:
| State | Meaning |
|---|---|
VALIDATING |
AppConfig is validating the configuration before the rollout begins (in-flight). |
DEPLOYING |
Configuration is being gradually rolled out to targets. |
BAKING |
Rollout reached all targets; the strategy is in its validation window. |
COMPLETE |
Deployment finished successfully. |
ROLLING_BACK |
Deployment is being rolled back, automatically (e.g. a CloudWatch alarm) or via apcdeploy rollback (in-flight). |
ROLLED_BACK |
Deployment was stopped (or rolled back by AppConfig); previous version is in effect. |
REVERTED |
Deployment was reverted to the previous configuration version (terminal). |
| Cause | Resolution |
|---|---|
No deployment has ever been made for the profile + environment (exit code 2) |
Run apcdeploy run -c apcdeploy.yml first to create the initial deployment, then status will have something to report. |
0: success1: AWS error2: no deployment exists for the profile + environment
# After deploying, poll for completion (10 s interval)
apcdeploy run -c apcdeploy.yml
while true; do
apcdeploy status -c apcdeploy.yml --silent
sleep 10
done
# Inspect a specific past deployment
apcdeploy status -c apcdeploy.yml --deployment 3Retrieves the deployed configuration via the AWS AppConfig Data API and writes it to stdout. The Data API is billed per call — prefer pull (which uses no Data API) unless you specifically need the data on stdout.
apcdeploy get -c apcdeploy.yml --yes > deployed.json| Flag | Description |
|---|---|
-y, --yes |
Skip the cost-confirmation prompt. Required in non-interactive environments. |
- Output channel: configuration body to stdout, formatted by Content-Type (JSON / YAML pretty-printed; plain text emitted as-is). Reporter chatter goes to stderr.
- Billing: each invocation calls
StartConfigurationSession+GetLatestConfigurationon the AppConfig Data API. AWS bills per call. The cost-confirmation prompt surfaces this;--yesbypasses it. - Alternative for AI agents: use
apcdeploy pullto sync the deployed configuration into the local data file without invoking the Data API.
0: success1: AWS error, or TTY error when--yesis missing in a non-interactive environment
# Save the deployed configuration to a file
apcdeploy get -c apcdeploy.yml --yes > deployed.json
# Pipe into jq
apcdeploy get -c apcdeploy.yml --yes | jq '.features.new_feature'Syncs the local data file with the currently deployed configuration. Does not use the AWS AppConfig Data API (no per-call billing).
apcdeploy pull -c apcdeploy.ymlNo command-specific flags. Uses global flags only (-c, --config, -s, --silent, and -c may be repeated for multi-config mode).
- Resolve the latest deployment for the profile + environment (errors if none exists)
- Fetch the hosted configuration version it points at
- Compare local vs deployed after normalization (FeatureFlags
_createdAt/_updatedAtstripped) - If they differ, overwrite the local data file; otherwise report "already up to date"
Compare-before-write means the local file's mtime is unchanged when content already matches.
- Idempotent: safe to run repeatedly; subsequent runs are no-ops if nothing changed.
- Content-Type aware: respects the content type recorded on the hosted configuration version (JSON / YAML / plain text).
- No Data API charges: uses control-plane APIs only (
ListDeployments+GetHostedConfigurationVersion).
| Cause | Resolution |
|---|---|
No prior deployment exists for the profile + environment (exit code 2) |
Run apcdeploy run once to create the first deployment, then re-run pull. |
0: success (including no-op when local file already matches)1: general error (AWS, I/O, etc.)2: no prior deployment exists for the profile + environment
# Sync after a change made in the AWS Console
apcdeploy pull -c apcdeploy.yml
# Idempotency: a second pull is a no-op
apcdeploy pull -c apcdeploy.yml # may write
apcdeploy pull -c apcdeploy.yml # "already up to date"Validates the local data file against its schema locally, without creating a configuration version (read-only — no write APIs are called).
apcdeploy validate -c apcdeploy.yml| Flag | Description |
|---|---|
--parallel <n> |
Maximum concurrent targets when -c is repeated (0 = all in parallel) |
--continue-on-error |
Run remaining targets after one fails (default: fail-fast) |
- Resolve the profile (reads its type and validators; no deployment is fetched)
- Read the local data file and determine its content type
- Select the schema: FeatureFlags use the built-in AWS schema; Freeform JSON uses the profile's JSON_SCHEMA validator fetched from AWS
- Validate, reporting each violation with its location within the data
- Read-only: never calls
CreateHostedConfigurationVersionor any write API; safe to run anytime. - FeatureFlags: checks structure against the built-in schema (layer A), then each value against the
constraintsdeclared in the data — enum / minimum / maximum / pattern / required / type (layer B). Multi-variant flags are checked per variant (_variants[].attributeValues). - Freeform JSON: validated against the profile's JSON_SCHEMA validator (the same validator AWS enforces at deploy time, fetched during resource resolution). When the profile has no JSON_SCHEMA validator, only JSON syntax is checked. AWS AppConfig supports JSON Schema draft 4.X for Freeform, so the schema is evaluated as draft-4 (any in-document
$schemadeclaring a different draft is ignored). - Freeform YAML / text: syntax only — JSON Schema cannot apply.
- LAMBDA validators are skipped: they run only inside AWS, so a passing
validatedoes not guarantee a LAMBDA validator will pass at deploy time. - Local validation approximates AWS: regex flavor and undocumented internals may differ, so in rare cases a schema-passing config can still be rejected at
run.
0: all targets valid1: validation failed, or a general error (AWS resolution, I/O)
# Validate every environment before deploying (quote globs; see Multi-config Mode)
apcdeploy validate -c 'environments/*.yml' --continue-on-errorStops an ongoing deployment by calling AWS AppConfig StopDeployment. Only in-flight deployments (DEPLOYING, BAKING, VALIDATING, or ROLLING_BACK) can be stopped — terminal deployments cannot be rolled back through this command (use Git-based revert + apcdeploy run instead).
apcdeploy rollback -c apcdeploy.yml --yes| Flag | Description |
|---|---|
-y, --yes |
Skip the confirmation prompt. Required in non-interactive environments. |
- Find the current ongoing deployment for the environment (errors if none is in-flight:
DEPLOYING/BAKING/VALIDATING/ROLLING_BACK) - If
--yesis not set, check TTY and prompt for confirmation (errors before any AWS write if no TTY) - Call
StopDeployment; AppConfig transitions the deployment toROLLED_BACKand reverts to the previous version
- Scope: stops in-flight deployments only. Does not use AppConfig's
AllowRevertfeature; does not touch completed deployments. - Local files unchanged:
rollbackmakes no changes to local files. After it succeeds, local files no longer match the deployed (reverted) configuration. - Post-rollback sync: choose one before continuing:
- Accept the reverted state:
apcdeploy pull -c apcdeploy.ymlto bring local files in line with the previous version. - Fix and redeploy: edit the local data file, then
apcdeploy diff→apcdeploy run.
- Accept the reverted state:
For reverting a completed deployment, use Git-based rollback:
git checkout <commit-hash> -- data.json
apcdeploy run -c apcdeploy.yml| Cause | Resolution |
|---|---|
No ongoing deployment in an in-flight state (DEPLOYING / BAKING / VALIDATING / ROLLING_BACK) (exit code 2) |
Nothing to stop. If you intended to revert a completed deployment, use Git revert + apcdeploy run. |
0: success1: AWS error, user declined the prompt, or TTY error when--yesis missing in a non-interactive environment2: no ongoing deployment to stop
# Stop the current rollout (non-interactive)
apcdeploy rollback -c apcdeploy.yml --yes
# Rollback then sync local files to the reverted state
apcdeploy rollback -c apcdeploy.yml --yes
apcdeploy pull -c apcdeploy.yml
# Rollback, fix the data, and redeploy
apcdeploy rollback -c apcdeploy.yml --yes
# (edit data.json)
apcdeploy diff -c apcdeploy.yml
apcdeploy run -c apcdeploy.ymlFetches the deployed configuration, opens it in $EDITOR, and deploys the result. Does not use apcdeploy.yml.
AI agents must not run this command. There is no non-interactive mode ($EDITOR is always launched, and a TTY is required). When a user wants this behavior, suggest the equivalent: apcdeploy pull → edit the data file programmatically → apcdeploy run.
For human users, edit is a quick-fix workflow when there is already a prior deployment for the target profile + environment. Target resolution accepts the same flags as init (--region / --app / --profile / --env); omitted flags fall through to interactive prompts. The deployment strategy of the latest deployment is reused unless overridden with --deployment-strategy. --wait-deploy / --wait-bake / --timeout / --description behave as in run (and --wait-deploy / --wait-bake are mutually exclusive).
Validation (2 MB size limit, JSON/YAML syntax check), idempotency (skip when normalized content is unchanged), and the in-progress-deployment guard all match run. $EDITOR defaults to vi and is invoked through sh -c like git's GIT_EDITOR, so avoid shell metacharacters in CI.
apcdeploy edit --region us-west-2 --app my-app --profile my-profile --env production0: success (including no-op when content is unchanged)1: general error, validation failure, or editor non-zero exit2: no prior deployment exists for the profile + environment
Prints the contents of llms.md (this document) to stdout. The content is embedded in the binary at build time, so the command works offline and does not invoke AWS.
apcdeploy context # full document to stdout
apcdeploy context | less # paged
apcdeploy context | grep ... # searchGlobal flags (-c, --silent) have no effect on this command.
Available for all commands:
-c, --config <path>: Configuration file path (default:apcdeploy.yml). Forrun/diff/pull/validateit may be repeated, comma-separated, or a quoted glob pattern to operate on several configs in one invocation (see "Multi-config Mode" below); all other commands accept exactly one-cand reject multiple.-s, --silent: Suppress verbose output (see "Silent Mode" below).
run, diff, pull, and validate support running against multiple configurations in one invocation. Pass -c repeatedly, comma-separate values, or pass a quoted glob pattern:
apcdeploy diff -c environments/dev.yml -c environments/stg.yml -c environments/prod.yml
apcdeploy run -c 'environments/*.yml' --parallel 3 --wait-bake
apcdeploy pull -c 'environments/*.yml' --continue-on-error
apcdeploy validate -c 'environments/*.yml' --continue-on-errorBehavior:
- Glob patterns are expanded by apcdeploy itself (via Go's
filepath.Glob), so they must be quoted (-c 'environments/*.yml'). An unquoted glob is expanded by the shell into positional arguments; apcdeploy rejects positional arguments with an error pointing back to quoting, rather than silently using only the first match. A pattern matching no files is an error; duplicates across patterns are de-duplicated preserving order. - Comma-separated values (
-c a.yml,b.yml) are split by the CLI framework (Cobra), not by apcdeploy. Because of this, a path that itself contains a comma will be split incorrectly — repeat-cfor such paths. - Each
-cis loaded and validated up-front; any single load failure aborts the batch before any AWS call. - Targets are identified by the 4-tuple
region/app/profile/env. Two configs that resolve to the same identifier produceErrDuplicateTarget. - Default execution is fully parallel (equivalent to
--parallel 0). Use--parallel Nto cap concurrency or--parallel 1for strict serial order. - Default failure mode is fail-fast: queued targets that haven't started yet are reported as
⊘ skipped (fail-fast). Use--continue-on-errorto run every target regardless of failures. - Each target's
--timeoutis independent (it is per-target, not a global wall-clock cap). - After all targets settle, a single aggregate line is printed:
N ok, N no-op, N failed [(elapsed)]. Failed targets are also expanded into anErrors:section with optionalResolution:hints. diff's stdout is buffered per target and emitted in argument order (so the combined diff stream is deterministic regardless of completion order). Each per-target body — including single-target invocations — is prefixed with=== <region>/<app>/<profile>/<env> ===. To pipe a body intopatch/git apply, strip the header lines first (e.g.apcdeploy diff -c x.yml | sed '/^=== /d').- For AI assistants: prefer single-target invocations unless the multi-config behavior is explicitly desired. Multi-target output is denser and harder to read step-by-step; failures are aggregated at the end of the run.
--silent (alias -s) suppresses Reporter chatter on stderr (progress, headers, info, warnings). Errors (stderr) and primary payloads — Data (e.g. get's body, ls-resources --json), Diff (diff's output), and the final state line for status --silent — are always emitted.
For AI agents: do not pass --silent. The suppressed progress lines are valuable for debugging when something goes wrong.
apcdeploy diff -c apcdeploy.yml --silent
apcdeploy ls-resources --region us-west-2 --json --silent > resources.jsonCross-cutting issues that span commands. Command-specific errors live in each command's Errors section.
Error: application "my-app" not found in region us-west-2The named resource does not exist in the queried region/account. Check:
- The resource exists in AWS Console.
region:inapcdeploy.yml(or--regionforinit/ls-resources/edit) matches the account the resource lives in.- The resolved AWS credentials point at the correct account (
aws sts get-caller-identity).
Error: failed to load AWS credentialsResolve via the standard AWS SDK chain:
aws sts get-caller-identity # verify which credentials are active
aws configure # configure shared profile
# Or: AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY / AWS_REGION env vars- Drop
--silentto see Reporter progress on stderr. - Use
diffbeforerunto verify the change set. - Use
statusto monitor an active deployment without waiting. - Use
get(orpull) to inspect what is actually deployed.
Keep one apcdeploy.yml per environment, side-by-side with its data file:
environments/
├── dev/{apcdeploy.yml,data.json}
├── staging/{apcdeploy.yml,data.json}
└── production/{apcdeploy.yml,data.json}
Deploy a single environment with -c:
apcdeploy run -c environments/production/apcdeploy.ymlOr deploy several at once via multi-config mode (see "Multi-config Mode" above):
apcdeploy run -c 'environments/*/apcdeploy.yml' --parallel 3Gate deployment on diff --exit-nonzero so the pipeline is a no-op when nothing changed:
- name: Deploy to AppConfig
run: |
if apcdeploy diff -c apcdeploy.yml --exit-nonzero --silent; then
echo "No changes to deploy"
else
apcdeploy run -c apcdeploy.yml --silent
fi--wait-* is intentionally omitted here; check rollout progress with a follow-up status step if needed.
To use apcdeploy, the following AWS AppConfig IAM permissions are required:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"appconfig:ListApplications",
"appconfig:ListConfigurationProfiles",
"appconfig:ListEnvironments",
"appconfig:ListDeploymentStrategies",
"appconfig:GetConfigurationProfile"
],
"Resource": "*"
}
]
}Additionally, the interactive region picker on init (when --region is omitted) calls account:ListRegions. Grant it only if you intend to use interactive init; non-interactive flows (--region supplied) do not need it.
validate needs only these basic permissions: it resolves the profile and reads its validators (GetConfigurationProfile) without fetching any deployment.
{
"Effect": "Allow",
"Action": [
"appconfig:CreateHostedConfigurationVersion",
"appconfig:StartDeployment",
"appconfig:GetDeployment",
"appconfig:GetHostedConfigurationVersion",
"appconfig:ListDeployments",
"appconfig:StopDeployment"
],
"Resource": "*"
}{
"Effect": "Allow",
"Action": [
"appconfig:StartConfigurationSession",
"appconfig:GetLatestConfiguration"
],
"Resource": "*"
}- Principle of least privilege: Grant only necessary permissions
- Resource restrictions: Restrict permissions to specific applications or resources where possible
- Credential management: Do not hardcode AWS credentials; use IAM roles or temporary credentials
- Audit logs: Use CloudTrail to record API calls
Yes. Pass -c repeatedly to run, diff, or pull (see "Multi-config Mode"). For example:
apcdeploy run -c environments/dev.yml -c environments/stg.yml -c environments/prod.yml --parallel 3Single-target invocations still work the same way; multi-target requires region: to be set in each yml.
Yes. Content-Type is detected automatically. For FeatureFlags profiles, the metadata fields _createdAt and _updatedAt are excluded from diff/idempotency comparisons.