# AWS authorization failing in Postman request

**URL:** <https://community.postman.com/t/aws-authorization-failing-in-postman-request/51766>\
**Category:** Help Hub\
**Tags:** collections, authentication, aws, collection-runner\
**Created:** [September 14, 2023, 10:54am UTC](https://community.postman.com/t/aws-authorization-failing-in-postman-request/51766 "2023-09-14T10:54:47Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![pauld123](https://avatars.discourse-cdn.com/v4/letter/p/d6d6ee/32.png) [@pauld123](https://community.postman.com/u/pauld123)\
**Post date:** [September 14, 2023, 10:54am UTC](https://community.postman.com/t/aws-authorization-failing-in-postman-request/51766/1 "2023-09-14T10:54:47Z")

</div>

Hello

Im trying to use new AWS access key and secret access key in a POSTMAN request.

The steps are

Step 1: Open PostMan

Step 2: Edit Environment Credentials with new daily Client Key and Secret

Step 3: Open Runner (in Postman)

Step 4: Add my collection

Step 5: Add spreadsheet

Step 6: Run the collection

However it keeps failing at Step 6 with the error FAIL - The security token included in the request is invalid. This happens even with fresh keys

Can you help with this? Or anything I can try?

Thanks

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [September 14, 2023, 11:44am UTC](https://community.postman.com/t/aws-authorization-failing-in-postman-request/51766/2 "2023-09-14T11:44:17Z")

</div>

Hey @pauld123 👋

Welcome to the Postman Community! :postman:

- Are you adding this token to the Environment Current Value only (recommend when using sensitive information)?

- Are you saving the Environment file after this is entered?

- Is the Environment selected as the `Active Environment` when using the Runner?

- In the Postman Console, is the AWS token correctly resolved in the request when you inspect the network traffic?

---

<div class="post-metadata">

**Author:** ![pauld123](https://avatars.discourse-cdn.com/v4/letter/p/d6d6ee/32.png) [@pauld123](https://community.postman.com/u/pauld123)\
**Post date:** [September 14, 2023, 1:26pm UTC](https://community.postman.com/t/aws-authorization-failing-in-postman-request/51766/3 "2023-09-14T13:26:15Z")

</div>

Thanks Danny. I will get my colleague to try this.

Should they also have an AWS Signature added which includes the following?  
Access Key  
Secret Key  
AWS Region  
Service Name

---

<div class="post-metadata">

**Author:** ![pauld123](https://avatars.discourse-cdn.com/v4/letter/p/d6d6ee/32.png) [@pauld123](https://community.postman.com/u/pauld123)\
**Post date:** [September 14, 2023, 1:47pm UTC](https://community.postman.com/t/aws-authorization-failing-in-postman-request/51766/4 "2023-09-14T13:47:19Z")

</div>

Hi Danny,

Please see the console error

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/8/0/806ff00cd5d04b831a7cad2cdb0c97c919bc9ac3.png)

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [September 14, 2023, 1:58pm UTC](https://community.postman.com/t/aws-authorization-failing-in-postman-request/51766/5 "2023-09-14T13:58:10Z")

</div>

That’s an error coming from the AWS Server - Are you setting the token in the correct place? I honestly don’t know enough about that to give you a better answer.

Are you using the AWS Helper in the Auth section to generate the token in the section where it’s required?

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/6/5/658dcbb3442f245abf8777b9996e075d5a663804.png)

---

<div class="post-metadata">

**Author:** ![pauld123](https://avatars.discourse-cdn.com/v4/letter/p/d6d6ee/32.png) [@pauld123](https://community.postman.com/u/pauld123)\
**Post date:** [September 14, 2023, 2:11pm UTC](https://community.postman.com/t/aws-authorization-failing-in-postman-request/51766/6 "2023-09-14T14:11:45Z")

</div>

**“That’s an error coming from the AWS Server - Are you setting the token in the correct place? I honestly don’t know enough about that to give you a better answer”**

Its an access key and secret access key. Can you tell me what you mean by token in in the correct place?

**Are you using the AWS Helper in the Auth section to generate the token in the section where it’s required?**

Do you mean I fill in the AWS signature details but also need to generate a token?

Sorry Im very new to POSTMAN

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [September 14, 2023, 2:25pm UTC](https://community.postman.com/t/aws-authorization-failing-in-postman-request/51766/7 "2023-09-14T14:25:59Z")

</div>

I don’t know the structure of the request that your making to AWS, their documentation should show you where the token/key/Auth details should be added.

How are you adding that to your request?

The Auth helper is there to take those details and will then add them to the request(s) so there shouldn’t be any need to add that manually. Again, I don’t know the endpoints you’re hitting or what details are required.

---

<div class="post-metadata">

**Author:** ![amuzha795](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@amuzha795](https://community.postman.com/u/amuzha795)\
**Post date:** [October 2, 2023, 6:53pm UTC](https://community.postman.com/t/aws-authorization-failing-in-postman-request/51766/8 "2023-10-02T18:53:42Z")

</div>

I am receiving a similar error. I have the session set and everything else.

```auto
<?xml version="1.0"?>
<ErrorResponse xmlns="http://queue.amazonaws.com/doc/2012-11-05/">
    <Error>
        <Type>Sender</Type>
        <Code>SignatureDoesNotMatch</Code>
        <Message>The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.

The Canonical String for this request should have been
'GET
/account-nr/xpg-dev-wpil-notifications
Action=ReceiveMessage
host:sqs.us-east-1.amazonaws.com
x-amz-date:20231002T185127Z
x-amz-security-token:'removed'

host;x-amz-date;x-amz-security-token'

The String-to-Sign should have been
'AWS4-HMAC-SHA256
20231002T185127Z
20231002/us-east-1/sqs/aws4_request
'
</Message>
        <Detail/>
    </Error>
    <RequestId></RequestId>
</ErrorResponse>

```

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [December 31, 2023, 6:53pm UTC](https://community.postman.com/t/aws-authorization-failing-in-postman-request/51766/9 "2023-12-31T18:53:57Z")

</div>

Closed on December 31, 2023, 6:53pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
