# AWS authentication using role based IAM (no secret key)

**URL:** https://discourse.nodered.org/t/aws-authentication-using-role-based-iam-no-secret-key/66864
**Category:** General
**Created:** [24 August 2022 16:58 UTC](https://discourse.nodered.org/t/aws-authentication-using-role-based-iam-no-secret-key/66864 "2022-08-24T16:58:48Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Barbudor](https://avatars.discourse-cdn.com/v4/letter/b/4af34b/32.png) [@Barbudor](https://discourse.nodered.org/u/Barbudor)
#### Post date: [24 August 2022 16:58 UTC](https://discourse.nodered.org/t/aws-authentication-using-role-based-iam-no-secret-key/66864/1 "2022-08-24T16:58:48Z")

</div>

Hello

We are using NodeRED running in AWS as a container with some AWS nodes part of `node-red-node-aws` (node-red-web-nodes) or `node-red-contrib-aws`

Those nodes require a global config node with AccessKey and SecretKey  
We want to move away from adding those credentials into Node-RED and use a IAM role directly attached to the container as we are using with other containers.

I wonder is anyone as ever done that, or if you see that as possible wth the nodes as they are ?

Or do I need to reconsider rewriting the nodes using function nodes directly calling the AWS SDK ?

thanks

---

<div class="post-metadata">

### Author: ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)
#### Post date: [24 August 2022 17:09 UTC](https://discourse.nodered.org/t/aws-authentication-using-role-based-iam-no-secret-key/66864/2 "2022-08-24T17:09:15Z")

</div>

Or you could update the nodes to support that mode and raise a Pull Request against the project

---

<div class="post-metadata">

### Author: ![Barbudor](https://avatars.discourse-cdn.com/v4/letter/b/4af34b/32.png) [@Barbudor](https://discourse.nodered.org/u/Barbudor)
#### Post date: [24 August 2022 17:35 UTC](https://discourse.nodered.org/t/aws-authentication-using-role-based-iam-no-secret-key/66864/3 "2022-08-24T17:35:22Z")

</div>

Indeed  
So you are more or less confirming that this is not achievable with the nodes in that state ?

I'm not sure yet if I'm able to make such PR.  
There's a step between doing some JS in a function node and updating a full node 😃  
I'll probably need some guidance

Thanks

---

<div class="post-metadata">

### Author: ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)
#### Post date: [24 August 2022 18:54 UTC](https://discourse.nodered.org/t/aws-authentication-using-role-based-iam-no-secret-key/66864/4 "2022-08-24T18:54:43Z")

</div>

Not really, if you can write the code in a function node, then editing existing code is considerably easier than writing a node from scratch. The pattern is pretty much the same.

It should just be a case of changing how the AWS client is initialised.

I'm not confirming it can't be done at the moment, I'm just saying if it's not then a **little** bit more effort helps everybody and you get to learn a little

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [23 October 2022 18:55 UTC](https://discourse.nodered.org/t/aws-authentication-using-role-based-iam-no-secret-key/66864/5 "2022-10-23T18:55:32Z")

</div>

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