# Amazon s3 out node returns 'invalid properties -aws'

**URL:** <https://discourse.nodered.org/t/amazon-s3-out-node-returns-invalid-properties-aws/70856>\
**Category:** General\
**Created:** [18 November 2022 21:00 UTC](https://discourse.nodered.org/t/amazon-s3-out-node-returns-invalid-properties-aws/70856 "2022-11-18T21:00:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ihum](https://avatars.discourse-cdn.com/v4/letter/i/f9ae1b/32.png) [@Ihum](https://discourse.nodered.org/u/Ihum)\
**Post date:** [18 November 2022 21:00 UTC](https://discourse.nodered.org/t/amazon-s3-out-node-returns-invalid-properties-aws/70856/1 "2022-11-18T21:00:27Z")

</div>

I am writing different JS functions to post, delete and get flows, and my flow is using the s3 out node.  
I am using the variables `${awsConfig}` and `${s3Bucket}` to hold values for `aws` and `bucket`.

When I run the js file which has my `postFlow` function and check my nodered editor, I see the correct bucket name as specified in my flow json file with `${s3Bucket}`, but I get a warning/error `invalid properties -aws` for the aws field.

When I replace `${awsConfig}` with hardcoded `123edhks2378js` and rerun my function, the message goes away.

When I input my `AccessKeyID` and `Secret Access Key` in the editor and export my flow, i see `aws: " "` in my json file, so there's no way for me to see or understand how this configuration works - which I assume is for security reasons.

My questions are:

1. Is there a way for me to export my `AccessKeyID` and `Secret Access Key` from my request body in a javascript function?

2. Also, if it's successfully exporting the bucket name and the warning message goes away when I hardcode the value of `${awsConfig}` in my json, why can't it just read and use this? `const awsConfig = "123edhks2378js"`

Here's a snippet of my flow (this is just the **s3 out node** ) and the way I declared the variables in the js file.

```auto
const awsConfig = "123edhks2378js"
const s3Bucket = "xyz"

```

```auto
  id: "dea435a278I882655",
      type: "amazon s3 out",
      z: "bb50d86374bc1547",
      aws: `${awsConfig}`,
      bucket: `${s3Bucket}`,
      filename: "",
      localFilename: "",
      region: "us-west-2",
      name: "Upload to S3",
      x: 1330,
      y: 400,
      wires: [],

```

---

<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:** [17 January 2023 21:01 UTC](https://discourse.nodered.org/t/amazon-s3-out-node-returns-invalid-properties-aws/70856/2 "2023-01-17T21:01:06Z")

</div>

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