Skip to content

Route53 list-hosted-zones in China #449

Description

@si-robinson

Using version 0.3.152

Trying to (route53/list-hosted-zones (:client-opts this))
Where (:client-opts this) looks like this:

{:endpoint "cn-northwest-1"}

produces :
INFO c.a.i.DefaultServiceEndpointBuilder - {route53, cn-northwest-1} was not found in region metadata, trying to construct an endpoint using the standard pattern for this region: 'route53.cn-northwest-1.amazonaws.com.cn'.

followed by:
Unable to execute HTTP request: route53.cn-northwest-1.amazonaws.com.cn

This would appear to be because Route53 endpoint in China is actually route53.amazonaws.com.cn

Changing client-opts to be

{:endpoint "route53.amazonaws.com.cn"}

results in:
com.amazonaws.services.route53.model.AmazonRoute53Exception: The security token included in the request is invalid.
(I'm assuming because it needs to know which region to use for IAM).

But trying to supply region as well in the client-opts:

{:endpoint "route53.amazonaws.com.cn"
 :region "cn-northwest-1"}

Still results in:
com.amazonaws.services.route53.model.AmazonRoute53Exception: The security token included in the request is invalid.

(I'm using AWS_PROFILEs and have checked that the credentials I'm using have access (they're admin).

I can see that cn-northwest-1 exists in aws-java-sdk-core/com.amazonaws/regions/Regions
And in com.amazonaws.services.route53.model/VPCRegion

So am assuming that for China, you need to override the endpoint and use the region provided?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions