From 77ad176866635f0c0fa27e42c5104998aff73944 Mon Sep 17 00:00:00 2001 From: Faisal Hameed Date: Sat, 9 Nov 2024 15:13:02 +0500 Subject: [PATCH] feat: add aws sessionToken support (#12) * feat: add aws sessionToken support * revert version --------- Co-authored-by: Faisal Hameed --- README.md | 7 +++++++ index.ts | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 974e99a..f5e8be0 100644 --- a/README.md +++ b/README.md @@ -170,6 +170,13 @@ Type: `string` Your AWS secret access key for authentication. +### sessionToken (aws) + +_Optional_\ +Type: `string` + +Your AWS session token for authentication. This is used when you are using temporary security credentials. + ## Testing To test this library during development, you'll need to provide your AWS diff --git a/index.ts b/index.ts index c7fb1b0..6cafd43 100644 --- a/index.ts +++ b/index.ts @@ -17,7 +17,7 @@ export interface Config extends CreateLogStreamRequest, Pick, - Pick + Pick { /** * defaults to http://npm.im/log4js-layout-json @@ -122,6 +122,7 @@ export function cloudwatch( credentials: { accessKeyId: config.accessKeyId, secretAccessKey: config.secretAccessKey, + sessionToken: config.sessionToken, }, });