# Accessing Node Settings

**URL:** <https://discourse.nodered.org/t/accessing-node-settings/20418>\
**Category:** Developing Nodes\
**Created:** [16 January 2020 02:35 UTC](https://discourse.nodered.org/t/accessing-node-settings/20418 "2020-01-16T02:35:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![iOnline247](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ionline247/32/15634_2.png) [@iOnline247](https://discourse.nodered.org/u/iOnline247)\
**Post date:** [16 January 2020 02:35 UTC](https://discourse.nodered.org/t/accessing-node-settings/20418/1 "2020-01-16T02:35:48Z")

</div>

I finally figured out how to send a config flag to the node instance of a plugin.

```javascript
const {
  AWS_ACCESS_KEY_ID,
  AWS_REGION,
  AMAZON_REGION,
  AWS_SECRET_ACCESS_KEY
} = process.env;

module.exports = function(RED) {
  function AWSConfigNode(config) {
    const node = this;

    RED.nodes.createNode(node, config);

    node.accessKey = node.credentials.accessKey || AWS_ACCESS_KEY_ID;
    node.secretKey = node.credentials.secretKey || AWS_SECRET_ACCESS_KEY;
    node.region = config.region || AWS_REGION || AMAZON_REGION;
    node.name = config.name;
  }

  RED.nodes.registerType("aws-sdk-any-config", AWSConfigNode, {
    settings: {
      awsSdkAnyConfig_hasCredentials: {
        value: !!(AWS_ACCESS_KEY_ID && AWS_SECRET_ACCESS_KEY),
        exportable: true
      }
    },
    credentials: {
      accessKey: { type: "text" },
      secretKey: { type: "password" }
    }
  });
};

```

However, I was expecting this flag to be available within the [Custom Edit Events](https://nodered.org/docs/creating-nodes/properties). In the screenshot the execution context (`this`) has some good information, but not the `awsSdkAnyConfig_hasCredentials` setting.

 ![node-ctx](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/7/774a282c06e33373d7ee91ed148515a654125e7a.jpeg)

I did find the setting available with this call: `RED.settings.awsSdkAnyConfig_hasCredentials`.

Would it be possible to add this as a new feature by passing these settings as an argument to the Custom Edit Functions?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [16 January 2020 09:15 UTC](https://discourse.nodered.org/t/accessing-node-settings/20418/2 "2020-01-16T09:15:25Z")

</div>

> [@iOnline247](#):
>
> Would it be possible to add this as a new feature by passing these settings as an argument to the Custom Edit Functions?

No - as you have noted, the value is exposed as `RED.setings.awsSdkAnyConfig_hasCredentials` and that is how you should reference it in your node functions.
