aws:aws-cli
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
aws:aws-cli [07/12/2023 15:39] – created - external edit 127.0.0.1 | aws:aws-cli [17/04/2025 11:26] (current) – [Explanation of "StandardsArn": "'"${STANDARD}"'"] andrew | ||
---|---|---|---|
Line 273: | Line 273: | ||
me (ajs/ | me (ajs/ | ||
</ | </ | ||
+ | |||
+ | |||
+ | ==== Get repos ==== | ||
+ | |||
+ | Used '' | ||
+ | |||
+ | get_repos.sh: | ||
+ | <code bash> | ||
+ | #!/bin/bash | ||
+ | # List repos from AWS codecommit | ||
+ | |||
+ | export AWS_DEFAULT_OUTPUT=" | ||
+ | |||
+ | aws codecommit list-repositories | jq -r ' | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | credential-age-check | ||
+ | pyside6-stuff | ||
+ | </ | ||
+ | |||
===== AWS NTP Time ===== | ===== AWS NTP Time ===== | ||
Line 530: | Line 551: | ||
</ | </ | ||
+ | |||
+ | |||
+ | ===== Embedding a BASH variable in JSON ===== | ||
+ | |||
+ | <code bash> | ||
+ | STANDARD=' | ||
+ | |||
+ | aws securityhub | ||
+ | --standards-control-association-updates \ | ||
+ | --profile OrgDeployRole \ | ||
+ | '[ | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ]' | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | ==== Explanation of " | ||
+ | |||
+ | JSON keys and values need to be quoted, so that's the outside double quotes, STANDARD cannot be expnded by the aws command so it is single quoted, but lastly as BASH sees it, it is double quoted so BASH can expand the variable " | ||
+ | |||
+ | I think.... Not 100% sure on the single quotes usage | ||
+ | |||
+ | |||
+ | |||
aws/aws-cli.1701963569.txt.gz · Last modified: by 127.0.0.1