Following the documentation I tried both, have pxctl
create a new bucket or use an existing one in us-west-2
. In the former case I get:
$ kubectl exec $PX_POD -n kube-system -- /opt/pwx/bin/pxctl credentials create --provider s3 --s3-access-key xxx --s3-secret-key xxx --s3-endpoint s3.amazonaws.com --s3-region us-west-2 my-s3-credentials
createCred: error validating credential during create:
AuthorizationHeaderMalformed: The authorization header is malformed; the region 'us-west-2' is wrong; expecting 'us-east-1'
status code: 400 ...
and in the latter case I get:
kubectl exec $PX_POD -n kube-system -- /opt/pwx/bin/pxctl credentials create --provider s3 --s3-access-key xxx --s3-secret-key xxx --s3-endpoint s3.amazonaws.com --s3-region us-west-2 --bucket xxx my-s3-credentials
createCred: error validating credential during create:
BucketRegionError: incorrect region, the bucket is not in 'us-west-2' region
status code: 301
$ aws s3api get-bucket-location --bucket xxx
{
"LocationConstraint": "us-west-2"
}