-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathaws_cli.aws.txt
104 lines (78 loc) · 5.06 KB
/
aws_cli.aws.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
┏━━━━━━━━━━━━━┓
┃ AWS CLI ┃
┗━━━━━━━━━━━━━┛
VERSION ==> #2.25.1
#Written in Python, using the Python client under-the-hood
SEE ALSO ==> #Doc for AWS general (and related)
#Doc for API, for request|response
┌─────────────┐
│ INSTALL │
└─────────────┘
INSTALL ==> #Download and run install script
#Does not automatically update, except when using the snap package (but it does not have autocompletion)
DOCKER IMAGE ==> #Available on Docker Hub or ECS
SERVICES ==> #Most are available, except some within last 6 months
#Some SERVICEs have CLI-only commands
┌────────────┐
│ OUTPUT │
└────────────┘
CONFIG.output
--output
ENVVAR AWS_DEFAULT_OUTPUT #'json' (def), 'yaml[-stream]', 'text' (TSV), 'table'
CONFIG.cli_timestamp_format #How timestamp are output:
# - 'iso8601' (def)
# - 'wire': as received from the API
--color #'auto' (def) or 'on|off'
CONFIG.cli_pager
--no-cli-pager #BOOL (def: true). Whether to use `less`
ENVVAR AWS_PAGER #'SHELL_COMMAND'
ENVVAR LC_ALL #Used
ENVVAR AWS_CLI_FILE_ENCODING #Def: locale-based, or 'UTF-8'. For input files
ENVVAR AWS_CLI_OUTPUT_ENCODING #Same but for terminal output
┌──────────────────┐
│ AUTOCOMPLETE │
└──────────────────┘
complete -C aws_completer aws #Adds autocompletion
#Binary installed alongside `aws`
CONFIG.cli_auto_prompt #Can be:
ENVVAR AWS_CLI_AUTO_PROMPT # - 'on'
# - 'on-partial':
# - only on incomplete|erroneous commands
# - e.g. when only `aws` entered
# - 'off' (def)
#Interactive TUI with:
# - autocomplete
# - makes API calls to guess values too
# - output preview
# - show description and full docs
# - docs
# - history (CTRL-R)
#Previously named aws-shell and was a separate binary, now deprecated
--[no-]cli-auto-prompt #BOOL (def: false)
saws ##Project adding autocompletion and syntax highlighting, but not maintained
┌────────────┐
│ WIZARD │
└────────────┘
aws SERVICE wizard ACTION #Like AWS SERVICE ACTION but interactively with a TUI
#Only for specific ACTIONs, and name is often different
┌───────────┐
│ ALIAS │
└───────────┘
~/.aws/cli/alias #Like shell aliases, but AWS CLI specific
#INI file
#Top-level key: [toplevel] or [command SERVICE]
#Nested key: 'ALIAS'
#Value:
# - '[SERVICE] ACTION [--FLAG...]'
# - '!SHELL_COMMAND'
# - can use $1, etc.
┌─────────────┐
│ HISTORY │
└─────────────┘
CONFIG.cli_history #"disabled" (def) or "enabled"
~/.aws/cli/history/history.db #SQLite database
aws history list #Show previous commands: ID, date, COMMAND, return code
aws history show [ID] #Show previous command in full: date, full REQ|RES, return code
#Def ID: last
--include|exclude #'EVENT,...'
--format #Always "detailed"