0

As supported regions for AWS services and its resources are not always the same, I want to fetch the supported regions for resources programatically. Is there any available command to do so?

I can find for the service but not for resource:

For example,

aws ssm get-parameters-by-path --path /aws/service/global-infrastructure/services/ec2/regions --output json

Reference: New – Query for AWS Regions, Endpoints, and More Using AWS Systems Manager Parameter Store

  • Why do you meany by "resource"? [According](https://docs.aws.amazon.com/ARG/latest/userguide/welcome.html#resource-groups-intro) to aws "a resource is an entity that you can work with. Examples include an Amazon EC2 instance, an AWS CloudFormation stack, or an Amazon S3 bucket." So resources are entities which you create. How would you create a resource in a non-supported region? – Marcin Apr 20 '20 at 06:02
  • Exactly, I meant this only I do not want to create a resource in a non-supported region. Let's say supported regions for a service "service1" are reg1,reg2,reg3,reg4,reg5 and that for its resource "resource1" are reg2,reg3,reg5 I can fetch the list of supported regions for "service1" using `aws ssm get-parameters-by-path --path /aws/service/global-infrastructure/services/service1/regions --output json` but cannot find any command to fetch the list for the resource. I need this to include it in a script which keeps all the services/resources' region list updated with that of AWS – avicloud720 Apr 20 '20 at 09:14
  • @Avishek, could you please provide an actual example of a resource in a region where that region does not have the service? – John Rotenstein Apr 20 '20 at 09:26

0 Answers0