- Newest
- Most votes
- Most comments
Hi there!
The part of the error message you shared that I would like to highlight is "Credential should be scoped to a valid region". In our documentation here [1], you will see this error is generally mentioned when the credential scopes region does not match the region of the request.
Looking at the additional details provided I can see the correct region has been defined in the ".aws" "config" file however, please also ensure the correct region has been defined in the "codedeploy.onpremises.yml" as mentioned here [2].
If I understand your context correctly, you created/used an instance present in the "us-east-1" region and scoped it to the "us-gov-west-1" region. Referencing here [3], you will see that credentials cannot be shared between partitions like Govcloud and the standard AWS regions. That means if you were perhaps using standard IAM region credentials, the request would fail. To confirm what principle/user you are performing API calls with, you can make use of the "aws sts get-caller-identity" AWS CLI command.
For further investigation I would recommend reaching out directly to AWS Support.
Relevant content
- asked 7 years ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 5 months ago