Optional ReadonlyargvsCommand as an argument vector. Provide either argvs or shellCommand, not both.
Use cases: Commands with complex quoting; Explicit argument passing
AWS: CloudFormation::Init commands (argv form)
Validation: Optional; array of strings; mutually exclusive with shellCommand
Optional ReadonlyenvEnvironment variables for the command. Overwrites (not appends) the existing environment.
Use cases: Injecting config values; Isolated command environments
AWS: CloudFormation::Init command env
Validation: Optional; map of variable name to value
Optional ReadonlyignoreContinue running subsequent commands if this one fails.
Use cases: Non-critical setup steps; Best-effort commands
AWS: CloudFormation::Init command ignoreErrors
Validation: Optional; boolean
Optional ReadonlyrestartWhen true, restarts associated services after this command runs.
Use cases: Config changes requiring service reload
AWS: CloudFormation::Init restart handle
Validation: Optional; boolean
Optional ReadonlyshellShell command string to execute. Provide either shellCommand or argvs, not both.
Use cases: Inline shell scripts; One-liner setup commands
AWS: CloudFormation::Init commands (shell form)
Validation: Optional; string; mutually exclusive with argvs
Optional ReadonlytestTest command run before the main command. If the test exits with code 0, the main command is skipped (test success = already done).
Use cases: Idempotent commands; Conditional execution
AWS: CloudFormation::Init command test
Validation: Optional; shell command string
Optional ReadonlywaitMinutes to wait after command completion (Windows only). Use waitForever or waitNone for reboot-aware alternatives.
Use cases: Post-reboot wait on Windows; Timed command completion
AWS: CloudFormation::Init command waitAfterCompletion
Validation: Optional; number (minutes)
Optional ReadonlywaitWait indefinitely for the instance to reboot and resume cfn-init. Mutually exclusive with waitAfterCompletion and waitNone.
Use cases: Commands that trigger a reboot (e.g. Windows updates)
AWS: CloudFormation::Init command waitAfterCompletion=forever
Validation: Optional; boolean
Optional ReadonlywaitDo not wait after this command completes. Mutually exclusive with waitAfterCompletion and waitForever.
Use cases: Fire-and-forget commands; Fast sequential execution
AWS: CloudFormation::Init command waitAfterCompletion=none
Validation: Optional; boolean
Optional ReadonlyworkingWorking directory for command execution.
Use cases: Running commands in application directories
AWS: CloudFormation::Init command cwd
Validation: Optional; valid directory path
Command execution configuration for CloudFormation Init. Provide either shellCommand or argvs. Commands run in lexicographical order of their key.