Reputation: 3662
I am trying to send a EC2 RestAPI (DescribeInstances) using Postman application. I created a user in IAM in AWS. I generated a AccessKeyId and SecretKey for that particular user, and gave the user "AmazonEC2FullAccess" policy (all EC2 access). I used the following steps in Postman to send the ResAPI:
In the "Authorization" Tab, selected "AWS Signature" and set the following fields:
Click on "Update Request", which ends up generating 3 Headers. I used the info from the generated Headers to modify the endpoint as follows:
When I sent the RestAPI by clicking on "Send", I get the following error response:
Status : "401 Unauthorized"
AuthFailure
AWS was not able to validate the provided access credentials4bc49d04-2115-4b95-8af5-5ac879ac5df3
The error seems to suggest a malformed RestAPI as opposed to an unauthorized access. Tried different variations, very confused. Any help would be highly appreciated.
Thank you, Ahmed.
Upvotes: 1
Views: 4200
Reputation: 238847
Just to complement @chriscatfr answer, here is a screenshot how to set postman parameters to query for instances in us-east-1
region:
Upvotes: 0
Reputation: 2662
I just found the solution to the same issue. Your URL should be:
https://ec2.us-west-1.amazonaws.com/?Action=DescribeInstances&Version=2016-11-15
It didn't work until I added &Version=2016-11-15
and the region.
This AWS Documentation page says that Version
is mandatory
Upvotes: 4