From 4424f0826e1c7b0f8ff3c276a8faf22b45944942 Mon Sep 17 00:00:00 2001 From: Chris Brown <1731074+ccbrown@users.noreply.github.com> Date: Sun, 11 May 2025 20:26:54 -0400 Subject: [PATCH] add additional info to latest article --- ...a-list-of-all-aws-regions-and-services.tsx | 62 ++++++++++++++++++- 1 file changed, 59 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/(public-area)/articles/how-to-programmatically-get-a-list-of-all-aws-regions-and-services.tsx b/frontend/src/app/(public-area)/articles/how-to-programmatically-get-a-list-of-all-aws-regions-and-services.tsx index bf0f5fe..a7f8bb8 100644 --- a/frontend/src/app/(public-area)/articles/how-to-programmatically-get-a-list-of-all-aws-regions-and-services.tsx +++ b/frontend/src/app/(public-area)/articles/how-to-programmatically-get-a-list-of-all-aws-regions-and-services.tsx @@ -1,3 +1,5 @@ +import Link from 'next/link'; + import { SyntaxHighlighter } from '@/components/SyntaxHighlighter'; const regionListExample = [ @@ -168,6 +170,25 @@ const accessReportExample = [ '}', ]; +const ec2DescribeRegionsExample = [ + 'aws ec2 describe-regions --all-regions', + '{', + ' "Regions": [', + ' {', + ' "Endpoint": "ec2.ap-south-2.amazonaws.com",', + ' "RegionName": "ap-south-2",', + ' "OptInStatus": "not-opted-in"', + ' },', + ' {', + ' "Endpoint": "ec2.ap-south-1.amazonaws.com",', + ' "RegionName": "ap-south-1",', + ' "OptInStatus": "opt-in-not-required"', + ' },', + ' ...', + ' ]', + '}', +]; + const article = { title: 'How To Programmatically Get a List of All AWS Regions and Services', author: { @@ -175,7 +196,7 @@ const article = { image: '/images/chris.jpg', }, description: - 'Here are some reliable, but little-known ways to programmatically get a list of all AWS regions and services.', + 'Here are the most reliable ways to programmatically get information about AWS regions and services from AWS.', date: new Date(Date.parse('2025-05-11T12:05:00-04:00')), content: ( <> @@ -186,8 +207,9 @@ const article = { out-dated.
- Fortunately, there's a way to get what we need directly from AWS. This makes it far more practical - to maintain up-to-date databases of regions and services. + Fortunately, there are several ways to get what we need directly from AWS. This makes it far more + practical to maintain up-to-date databases of regions and services. This article briefly goes over the + most common ways to reliably get this information from AWS.
@@ -221,6 +243,32 @@ const article = { because it's been locked down using Cloud Snitch. For an unrestricted account, your report would contain several hundred services.
++ You also have the option of using the EC2{' '} + + DescribeRegions + {' '} + API to get a list of all available regions: +
++ And similarly, you can use the{' '} + + DescribeAvailabilityZones + {' '} + API to get a list of all available availability zones within each region. +
> ), relatedLinks: [ @@ -232,6 +280,14 @@ const article = { title: 'GenerateOrganizationsAccessReport', url: 'https://docs.aws.amazon.com/IAM/latest/APIReference/API_GenerateOrganizationsAccessReport.html', }, + { + title: 'DescribeRegions', + url: 'https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeRegions.html', + }, + { + title: 'DescribeAvailabilityZones', + url: 'https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeAvailabilityZones.html', + }, ], };