lazywithclass / winston-cloudwatch

Send logs to Amazon Cloudwatch using Winston.
MIT License
258 stars 104 forks source link

Top level AWS credentials does not work anymore, but attached in docs #199

Closed naufik closed 2 years ago

naufik commented 2 years ago

Issue:

I have updated to v6.0.1 from version 3.x and had previously set up our transport as follows when using version 3.x:

new WinstonCloudwatch({
  awsAccessKeyId: "...",
  awsSecretKey: "...",
  awsRegion: "...",
});

This apparently has stopped working and we had to switch our configuration to follow your new example:

new WinstonCloudwatch({
  awsOptions: {
    credentials: { ... },
    region: "..."
  }
});

While this may be expected. Your README.md still lists awsAccessKeyId, awsSecretKey, awsRegion under Options. Typescript typings also still contain those properties.

Could you please confirm whether this is a bug or the former is intentionally dropped off (in which case the docs should be updated)?

lazywithclass commented 2 years ago

Sorry for the confusion, the correct way is the second one as the docs and TS typings are outdated. I forgot to update them after a PR.

naufik commented 2 years ago

Thanks for the clarification, it's all good 👍🏽