Skip to content

Commit

Permalink
feat: add aws sessionToken support (#12)
Browse files Browse the repository at this point in the history
* feat: add aws sessionToken support

* revert version

---------

Co-authored-by: Faisal Hameed <[email protected]>
  • Loading branch information
faisal-hameed and Faisal Hameed authored Nov 9, 2024
1 parent f76331e commit 77ad176
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export interface Config
extends
CreateLogStreamRequest,
Pick<RegionInputConfig, "region">,
Pick<AwsCredentialIdentity, "accessKeyId" | "secretAccessKey">
Pick<AwsCredentialIdentity, "accessKeyId" | "secretAccessKey" | "sessionToken">
{
/**
* defaults to http://npm.im/log4js-layout-json
Expand Down Expand Up @@ -122,6 +122,7 @@ export function cloudwatch(
credentials: {
accessKeyId: config.accessKeyId,
secretAccessKey: config.secretAccessKey,
sessionToken: config.sessionToken,
},
});

Expand Down

0 comments on commit 77ad176

Please sign in to comment.