Reputation: 378
Working on development of a cloud-based app using AWS CDK using the TS template and I'd like to be able to check for a service's availability in a region and handle the case that it's not available, ideally deploy to another region with the availability for a particular service.
I've got an idea on how to check but it seems sub-optimal and a little hack-y.
$ curl --request GET \
--url https://pinpoint.eu-west-3.amazonaws.com/
$ curl --request GET \
--url https://pinpoint.us-east-1.amazonaws.com/
Ideally I'd like to be able to use some function like this, but I can't seem to find one in the JS AWS SDK.
Upvotes: 0
Views: 173
Reputation: 3130
Surprisingly, there are no methods for that in the other language versions of the SDK. However, I found something called AWS Systems Manager that might be exactly what we need. (By the way, these are the declared ways of accessing AWS endpoints and services information).
AWS SSM has a feature called Parameter Store's Public Parameters. Some information about AWS endpoints and services can be accessed through them.
Some useful actions could be:
getParameter
getParameters
getParametersByPath
describeParameters
Consider that you may need to be authenticated to perform some actions.
I didn't really have the time to test it thoroughly, so please let me know if somehow it helps solving your problem.
Upvotes: 1