Amazon s3 out node returns 'invalid properties -aws'

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.

const awsConfig = "123edhks2378js"
const s3Bucket = "xyz"
  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: [],

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