AWS Services — How to list all services in IAM format per region

Really quick post :)

There was interesting question in AWS Community Builders, how to get all AWS services list in IAM format.

There are many Github repositories, which maintain static list, but I wanted something dynamic. Investigating code for AWS services page, I was thinking it is indeed JSON list of services, constantly updating. Here is link to page.

Scripts are available at GitHub

Parsing file:

Note: I assume we downloaded file and saved to services.json

All services in all regions, including People’s Republic of China:

cat services.json |jq -r ‘.prices[]|.id as $d|([$d]|@csv)’

Particular service FSX Lustre:

cat services.json |jq -r ‘.prices[]|.id as $d|([$d]|@csv)’ |grep lustre

If you want to print with service full name — not elegant but works:

cat services.json |jq -r ‘.prices[]|.id as $d|([.attributes|tostring ,$d]|@csv)’|awk -F ‘,’ ‘{print $2, $4}’

Not all services are available in every region

Update 11/16/20

see also New — Query for AWS Regions, Endpoints, and More Using AWS Systems Manager Parameter Store

Thanks to Ken Robbins from AWS Community Builders, adding aws ssm part:

Get all regions:

aws ssm get-parameters-by-path — path /aws/service/global-infrastructure/regions — output json|jq .Parameters[].Name

Get all services:

aws ssm get-parameters-by-path — path /aws/service/global-infrastructure/services — output json|jq .Parameters[].Name

Get services in specific region:

aws ssm get-parameters-by-path \
--path /aws/service/global-infrastructure/regions/us-east-1/services --output json | \
jq .Parameters[].Name

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

The Modern Cpp Challenge on Mobile — Greatest commont divisor

Deployment Setup in Yuk-Recycle

CS371g Summer 2021 Final Entry: Albin Shrestha

The benefits of writing honest code

Day 12 of 30-Day LeetCode Challenge

A Quick Rant About Deadlines

6 reasons to build your next app with Ionic 5

How to Build a Desktop Application with Java

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
John Gakhokidze

John Gakhokidze

More from Medium

Clone for H&M website

Beginner’s Guide Part 8: Trading/investing plan

Wagtail blog part#1

Beginner’s Guide To Git And Github Part 2