AWS authorization failing in Postman request

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

Hey @pauld123 :wave:

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?

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

Hi Danny,

Please see the console error

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?

“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

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.

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

<?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>

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