AWS CLI Cheat Sheet/Pass structured input from JSON

Provide command arguments from a JSON document.

Section: Global Options, Output, and Queries

Pass structured input from JSON

bash
bash
aws ec2 run-instances --cli-input-json file://run-instances.json
Explanation

Useful when commands have many nested parameters.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Global Options, Output, and Queries
Generate input skeleton
Print a JSON skeleton for command input.
OpenIn sheetbashsame section
Override region for one command
Run a command in a specific region.
OpenIn sheetbashsame section
Use a specific profile
Run a command under a named profile.
OpenIn sheetbashsame section
Render tabular output
Format command results as a table.
OpenIn sheetbashsame section
Filter results with JMESPath
Select fields from JSON output.
OpenIn sheetbashsame section
Disable the default pager
Prevent output from opening in a pager.
OpenIn sheetbashsame section