# HTTP node not using AWS Lambda IAM credentials from predefined credentials (AWS Lambda node works)

**URL:** <https://community.n8n.io/t/http-node-not-using-aws-lambda-iam-credentials-from-predefined-credentials-aws-lambda-node-works/107941>\
**Category:** Questions\
**Tags:** node, http-request, aws-lambda\
**Created:** [April 29, 2025, 3:13pm UTC](https://community.n8n.io/t/http-node-not-using-aws-lambda-iam-credentials-from-predefined-credentials-aws-lambda-node-works/107941 "2025-04-29T15:13:39Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ahmad\_Rajput](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ahmad_rajput/32/30544_2.png) [@Ahmad\_Rajput](https://community.n8n.io/u/Ahmad_Rajput)\
**Post date:** [April 29, 2025, 3:13pm UTC](https://community.n8n.io/t/http-node-not-using-aws-lambda-iam-credentials-from-predefined-credentials-aws-lambda-node-works/107941/1 "2025-04-29T15:13:39Z")

</div>

## Describe the problem/error/question

The HTTP node isn’t picking up the AWS Lambda credentials. I configured credentials by attaching a policy directly to the IAM user, generating access keys and using them in the predefined credentials. The AWS Lambda node works fine. I want to use the HTTP node because it supports batching and concurrent executions, which the Lambda node doesn’t.

I have had the same issue before but I “fixed” that by not using authentication at all and now I want to use authentication.

## What is the error message (if any)?

message:Forbidden - perhaps check your credentials?  
name:NodeApiError  
description:Forbidden  
context:[empty object]  
message:403 - “{"Message":"Forbidden"}”  
name:AxiosError

## Please share your workflow

## Share the output returned by the last node

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/4/8/48d8abd52b87b23aa1ed0f71acfcee22083a9778.png)  
 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/b/b/bb1bf0bd31fbdf1778357e979598d5c15c4ca8fa.png)  
 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/1/1/11686f0ff07a1e5577507e21e7746ab888e4110e.png)

## Information on your n8n setup

- **n8n version: 1.89.2**
- **Database (default: SQLite): Postgres**
- **n8n EXECUTIONS\_PROCESS setting (default: own, main): queue maybe**
- **Running n8n via (Docker, npm, n8n cloud, desktop app): Docker**
- **Operating system: Docker**

---

<div class="post-metadata">

**Author:** ![ThinkBot](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/thinkbot/32/62172_2.png) [@ThinkBot](https://community.n8n.io/u/ThinkBot)\
**Post date:** [April 29, 2025, 5:36pm UTC](https://community.n8n.io/t/http-node-not-using-aws-lambda-iam-credentials-from-predefined-credentials-aws-lambda-node-works/107941/2 "2025-04-29T17:36:34Z")

</div>

Are you sure the URL is correct?

Is there any subpaths / endpoints the URL should be formatted with? Usually you don’t just post to a raw URL but a specific endpoint. But I am not hyper familiar with AWS lambda, if that is a function, then maybe there aren’t any additional url paths.

---

<div class="post-metadata">

**Author:** ![Ahmad\_Rajput](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ahmad_rajput/32/30544_2.png) [@Ahmad\_Rajput](https://community.n8n.io/u/Ahmad_Rajput)\
**Post date:** [April 29, 2025, 6:47pm UTC](https://community.n8n.io/t/http-node-not-using-aws-lambda-iam-credentials-from-predefined-credentials-aws-lambda-node-works/107941/3 "2025-04-29T18:47:46Z")

</div>

I have worked with aws lambda before and I am pretty sure the url is correct. That is why it says unauthorized. The credentials also cannot be wrong as they are listing the function names correctly. I highly suspect that https node is not including the AWS predefined credentials in it.

---

<div class="post-metadata">

**Author:** ![ThinkBot](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/thinkbot/32/62172_2.png) [@ThinkBot](https://community.n8n.io/u/ThinkBot)\
**Post date:** [April 30, 2025, 1:54am UTC](https://community.n8n.io/t/http-node-not-using-aws-lambda-iam-credentials-from-predefined-credentials-aws-lambda-node-works/107941/4 "2025-04-30T01:54:44Z")

</div>

Are you able to try with adding a header for bearer or basic or perhaps JWT auth?

---

<div class="post-metadata">

**Author:** ![Ahmad\_Rajput](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ahmad_rajput/32/30544_2.png) [@Ahmad\_Rajput](https://community.n8n.io/u/Ahmad_Rajput)\
**Post date:** [April 30, 2025, 8:11am UTC](https://community.n8n.io/t/http-node-not-using-aws-lambda-iam-credentials-from-predefined-credentials-aws-lambda-node-works/107941/5 "2025-04-30T08:11:12Z")

</div>

your advice misses the fundamental point **AWS doesn’t takes a simple bearer or basic auth header at Lambda** and the HTTP node in n8n **is not** automatically picking up or applying AWS access keys, only the dedicated AWS Lambda node (which i believe uses the AWS SDK under the hood) does

AWS Lambda’s HTTPS API requires AWS Signature Version 4, not a bearer token. When we use the AWS Lambda node in n8n, it internally takes access key and secret, builds the request, computes the HMAC‐SHA256 signature and then sends it. I recommend you read this link:

> **[Create a signed AWS API request - AWS Identity and Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv-create-signed-request.html)**
>
> Learn how to use the AWS SigV4 signing protocol to create a signed request for AWS API requests. You’ll learn how to create and hash a canonical request, create a string to sign, derive a signing key, and calculate a signature to add to the request.

or for more easy explaination:

> **[Authenticating Requests (AWS Signature Version 4) - Amazon Simple Storage...](https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html)**
>
> Learn how AWS authenticates requests with HTTP headers or query string parameters.

The requests have clear X-Amz-\* headers which i cannot see in the https node raw request output in the console. The only other option i can think of is using subworkflows but since there could be potentially 100s of requests I really want to avoid it. Https node is quite versatile and handles everything we can think of but in this case I am unable to understand what I am doing wrong.

---

<div class="post-metadata">

**Author:** ![mohamed3nan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mohamed3nan/32/188347_2.png) [@mohamed3nan](https://community.n8n.io/u/mohamed3nan)\
**Post date:** [April 30, 2025, 9:16am UTC](https://community.n8n.io/t/http-node-not-using-aws-lambda-iam-credentials-from-predefined-credentials-aws-lambda-node-works/107941/6 "2025-04-30T09:16:39Z")

</div>

Hi @Ahmad_Rajput

I have a suggestion that’s worked for me when AWS\_IAM felt overly complicated.

Instead of using **AWS\_IAM** for Lambda authorization, we can use a custom header and design the function to handle it.

Here’s how you can do it:

1. Disable built-in auth:

2. Add a custom header:

3. Enforce your own check in Lambda, something like this  

4. HTTP node config

If someone sends the wrong header value, your Lambda will automatically return the expected 403 error

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/e/c/ecce77d62854c8eeafb3488ea2b2004b3808dcb8.png)

---

<div class="post-metadata">

**Author:** ![Ahmad\_Rajput](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ahmad_rajput/32/30544_2.png) [@Ahmad\_Rajput](https://community.n8n.io/u/Ahmad_Rajput)\
**Post date:** [April 30, 2025, 11:32am UTC](https://community.n8n.io/t/http-node-not-using-aws-lambda-iam-credentials-from-predefined-credentials-aws-lambda-node-works/107941/7 "2025-04-30T11:32:52Z")

</div>

Thank you @mohamed3nan ,

I also suspected the same we have to do this, i was thinking about basic auth but this also works good. I will mark your answer as the solution.

Do you think i should raise this as a bug report? What about requesting a feature for batching AWS Lambda node requests?

---

<div class="post-metadata">

**Author:** ![mohamed3nan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mohamed3nan/32/188347_2.png) [@mohamed3nan](https://community.n8n.io/u/mohamed3nan)\
**Post date:** [April 30, 2025, 11:49am UTC](https://community.n8n.io/t/http-node-not-using-aws-lambda-iam-credentials-from-predefined-credentials-aws-lambda-node-works/107941/8 "2025-04-30T11:49:06Z")

</div>

You’re welcome!

To be honest, I haven’t personally dealt with `X-Amz-*` headers or AWS\_IAM auth directly in this context, so I can’t say for sure whether it’s a bug.  
But if you suspect it is, I’d definitely suggest opening a GitHub issue!

As for built-in batching AWS Lambda node, I think that’s a solid idea.  
There are plenty of use cases where batching could be really useful, so it’s worth submitting a feature request as well #Feature Requests

---

<div class="post-metadata">

**Author:** ![anon61017519](https://avatars.discourse-cdn.com/v4/letter/a/67e7ee/32.png) [@anon61017519](https://community.n8n.io/u/anon61017519)\
**Post date:** [April 30, 2025, 7:44pm UTC](https://community.n8n.io/t/http-node-not-using-aws-lambda-iam-credentials-from-predefined-credentials-aws-lambda-node-works/107941/9 "2025-04-30T19:44:00Z")

</div>

Excellent solution

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [May 7, 2025, 7:44pm UTC](https://community.n8n.io/t/http-node-not-using-aws-lambda-iam-credentials-from-predefined-credentials-aws-lambda-node-works/107941/10 "2025-05-07T19:44:18Z")

</div>

Closed on May 7, 2025, 7:44pm UTC

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