cloudformation-cli icon indicating copy to clipboard operation
cloudformation-cli copied to clipboard

Cloudcontrol api region support plan/roadmap?

Open pancaoms opened this issue 1 year ago • 5 comments

Hi there,

We found one issue when we tried to call cloudcontrol api to list some resources from different regions: for the same resource, cloudcontrol api was supported in one region but not in another region.

For example, we call aws cloudcontrol list-resources --type-name "AWS::Lightsail::Instance" in both sa-east-1 and us-east-1 but we got reourceTypeNotFound exception in sa-east-1: image We could run it in us-east-1: image

We have two questions related to this issue:

  1. Is there an official roadmap document available that indicates when specific regions will fully support the Cloud Control API?
  2. Is there an API or method available to query and list all regions where a specific resource type is supported by the Cloud Control API?

Thanks

pancaoms avatar Aug 26 '24 20:08 pancaoms

Hi any updates on this?

pancaoms avatar Aug 29 '24 03:08 pancaoms

It looks like the issue you're having is that the Lightsail::Instance resource is not supported in that region? In which case this would be a question for that service rather than cloud control.

Here's the list of supported regions for light sail: https://docs.aws.amazon.com/lightsail/latest/userguide/understanding-regions-and-availability-zones-in-amazon-lightsail.html

from your first screen shot, I see you're using sa-east-1? I don't see that on the list.

jregistr avatar Jun 02 '25 20:06 jregistr

Thanks @jregistr. My question is other than going through official docs to get the region list for one service, Is there an API or method available to query and list all regions where a specific resource type is supported by the Cloud Control API? For example in case of Lighsail::Instance, is there any API we can call to get the region list which is exactly the same as what you sent in the link above.

pancaoms avatar Jun 02 '25 21:06 pancaoms

, Is there an API or method available to query and list all regions where a specific resource type is supported by the Cloud Control API

None that I'm aware of. You should be able to verify this using the describe-type api for a given region.

aws cloudformation describe-type --type-name 'AWS::Lightsail::Instance' --region us-east-1

if it's supported in that region, it will print the resource schema. Otherwise, you get a not found error

An error occurred (TypeNotFoundException) when calling the DescribeType operation: The type 'AWS::Lightsail::Instance' cannot be found

jregistr avatar Jun 14 '25 22:06 jregistr

If we combine describe-regions api from ec2 with a loop, we should be able to list all the regions LightSail::Instance is supported.

TYPE_NAME="AWS::Lightsail::Instance"

for region in $(aws ec2 describe-regions --query "Regions[].RegionName" --output text); do
  echo -n "$region: "
  if aws cloudformation describe-type \
      --region "$region" \
      --type RESOURCE --no-cli-pager \
      --type-name "$TYPE_NAME" \
      --query 'TypeName' \
      --output text >/dev/null 2>&1; then
    echo "✅"
  else
    echo "❌"
  fi
done

Output

ap-south-1: ✅
eu-north-1: ✅
eu-west-3: ✅
eu-west-2: ✅
eu-west-1: ✅
ap-northeast-3: ❌
ap-northeast-2: ✅
ap-northeast-1: ✅
ca-central-1: ✅
sa-east-1: ❌
ap-southeast-1: ✅
ap-southeast-2: ✅
eu-central-1: ✅
us-east-1: ✅
us-east-2: ✅
us-west-1: ❌
us-west-2: ✅

Assuming ofc the describe-regions api lists all commercial regions.

jregistr avatar Jun 14 '25 22:06 jregistr