Daniel-t / node-red-contrib-aws

A collection of Node-RED nodes for AWS.
Apache License 2.0
56 stars 59 forks source link

Feature Request: IAM auth with SessionToken #94

Open osulivanDE opened 1 year ago

osulivanDE commented 1 year ago

I am trying to upload data to Mapbox S3 staging server and the API documentation from Mapbox uses this example for AWS CLI:

$ export AWS_ACCESS_KEY_ID={accessKeyId}
$ export AWS_SECRET_ACCESS_KEY={secretAccessKey}
$ export AWS_SESSION_TOKEN={sessionToken}
$ aws s3 cp /path/to/file s3://{bucket}/{key} --region us-east-1

Link to API Doc

My problem is that i haven´t found a node where i can pass the sessionToken into for this IAM authentication.

Is there already a way to do this or might that be a feature for furure development of this integration?

Thank a lot.

uenotakeshi1048 commented 1 year ago

with msg.AWSConfig, I was able to specify the sessionToken and make it work like:

msg.AWSConfig = {
  "accessKeyId": "ACCESSKEY",
  "secretAccessKey": "SECRETACCESSKEY",
  "sessionToken": "SESSIONTOKEN",
  "region":"ap-northeast-1"
}