node-red-contrib-aws icon indicating copy to clipboard operation
node-red-contrib-aws copied to clipboard

Feature Request: IAM auth with SessionToken

Open osulivanDE opened this issue 1 year ago • 1 comments

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.

osulivanDE avatar Jul 10 '23 13:07 osulivanDE

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"
}

uenotakeshi1048 avatar Jul 21 '23 07:07 uenotakeshi1048