-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to replace awscurl (works) with aws-curl (not yet working) #2
Comments
So, you are trying to invoke API on private api gateway located in another AWS account behind VPC endpoint? |
Please try test version from |
are you sure you have valid AWS credentials in ENV variables? aws-curl doesn't read ~/.aws/credentials. |
I will run that verbose.
Yes I’m sure the credentials are in environment variables. That’s required by awscurl also.
…--
Daniel Rose
972-342-5208 cell
On Oct 29, 2021, at 5:09 PM, Artem Butusov ***@***.***> wrote:
are you sure you have valid AWS credentials in ENV variables? aws-curl doesn't read ~/.aws/credentials.
Could you please post output of aws-curl --verbose ...?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
I might need to see also |
Here are three files, the functions defined, and the verbose output of each.... |
I have published new revision |
No improvement, output attached... |
Try without connection header. |
Now it says... |
Try to pass explicitly “—service execute-api” |
Hooray it works now! I had --service set explicitly before, and must have deleted that part while removing the connection header. |
Thanks for confirmation. I will keep the issue open until I will merge the change to the main branch. |
By the way, 2 minor differences remains..., which don't bother me.
✔ ~/Documents/aws
Just FYI as I can live without those headers. |
|
with aws-curl apparently I need to add --service exectute-api, but it still fails...
Ran these back to back...
Success:
$ awscurl --region us-east-1 --location --request POST --header 'host: ao9ypslxuh.execute-api.us-east-1.amazonaws.com' --header 'Content-Type: application/json' --header 'Accept: /' --header 'Accept-Encoding: gzip, deflate, br' --header 'Connection: keep-alive' --data '{
"cluster_name": "dev3-compute-dev-us-east-1",
"ingress_weight": "255",
"k8s_name": "dev3-100-fltsuite-svc-data-fltsuite-svc-data",
"k8s_namespace": "dev3-fltsuite-svc-data"
}' "https://vpce-0e417798a7d74506c-brkzcqhg.execute-api.us-east-1.vpce.amazonaws.com/dev-sre/sre/ops/eks/modify-ingress-dns-weight"
Ingress dns record weight updated successfully
$ aws-curl --service execute-api --region us-east-1 --location --request POST --header 'host: ao9ypslxuh.execute-api.us-east-1.amazonaws.com' --header 'Content-Type: application/json' --header 'Accept: /' --header 'Accept-Encoding: gzip, deflate, br' --header 'Connection: keep-alive' --data '{
"cluster_name": "dev3-compute-dev-us-east-1",
"ingress_weight": "255",
"k8s_name": "dev3-100-fltsuite-svc-data-fltsuite-svc-data",
"k8s_namespace": "dev3-fltsuite-svc-data"
}' "https://vpce-0e417798a7d74506c-brkzcqhg.execute-api.us-east-1.vpce.amazonaws.com/dev-sre/sre/ops/eks/modify-ingress-dns-weight"
{"message":"The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method....
The Canonical String for this request should have been
'POST
/dev-sre/sre/ops/eks/modify-ingress-dns-weight
accept:/
accept-encoding:gzip, deflate, br
connection:
content-type:application/json
host:ao9ypslxuh.execute-api.us-east-1.amazonaws.com
x-amz-date:20211027T205534Z
x-amz-security-token:FwoGZXIvYXdzEA4aDOy<deleted==
accept;accept-encoding;connection;content-type;host;x-amz-date;x-amz-security-token
bf175ed8be53b4bdb6c593db867e5a99295e495cbbedc340d0e0828b7df40e32'
The String-to-Sign should have been
'AWS4-HMAC-SHA256
20211027T205534Z
20211027/us-east-1/execute-api/aws4_request
04bec624523a442fe9eb358d3b6bfb562a55cad968c23788bf1ce4970c8a706f'
Then removing all the optional headers made no diff.
aws-curl --service execute-api --region us-east-1 --request POST --header 'host: ao9ypslxuh.execute-api.us-east-1.amazonaws.com' --header 'Content-Type: application/json' --data '{
"cluster_name": "dev3-compute-dev-us-east-1",
"ingress_weight": "255",
"k8s_name": "dev3-100-fltsuite-svc-data-fltsuite-svc-data",
"k8s_namespace": "dev3-fltsuite-svc-data"
}' "https://vpce-0e417798a7d74506c-brkzcqhg.execute-api.us-east-1.vpce.amazonaws.com/dev-sre/sre/ops/eks/modify-ingress-dns-weight"
{"message":"The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method.
The text was updated successfully, but these errors were encountered: