Skip to content

Instantly share code, notes, and snippets.

@garystafford
Last active May 14, 2022 19:02
Show Gist options
  • Save garystafford/37442d8fd8dde388f50856c6a2900b0d to your computer and use it in GitHub Desktop.
Save garystafford/37442d8fd8dde388f50856c6a2900b0d to your computer and use it in GitHub Desktop.
One-liner to retrieve a list of all AWS products from aws.amazon.com/products sorted by product category (requires jq). Worked as of 2022-01-03. Page format tends to change a lot...
curl --silent --compressed \
'https://aws.amazon.com/api/dirs/items/search?item.directoryId=aws-products&sort_by=item.additionalFields.productCategory&sort_order=asc&size=500&item.locale=en_US' \
| jq -r '.items[].item | .additionalFields.productCategory + " | " + .additionalFields.productName' \
| sort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment