-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
s3-streamlogger version ^1.7.0 is encountering an error as Region is missing #48
Comments
I think this must have been a change in moving to AWS SDK v3, sorry this should probably have been published as a breaking change, I didn't realise the SDK v3 had a breaking change in the way it requires the region like this. You should ideally provide configuration (including the region) for the AWS SDK through one of the methods described here: https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/setting-credentials-node.html, rather than passing them through the config as well. Also, I notice that you're only rotating the file every 20MB or 30 days. Using smaller values here will significantly reduce your S3 data transfer costs for the logs. |
@autopulated I have updated the version of both Also configured the aws credentials as follows, but got the same error as Region is missing.
Error as :
|
Version 1.9 uses AWS SDK v3 (specifically, "@aws-sdk/client-s3": "^3.353.0"). This will be used alongside any aws sdk v2 that you are importing into your project, and is not affected by it. There is no such To configure the region either pass options.region, or configure the AWS SDK v3 using one of the other methods, like environment variables or the shared credentials file (https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/global-config-object.html). |
The provided code using "s3-streamlogger" version ^1.7.0 is generating an error, and the issue pertains to a missing region.
"s3-streamlogger": "^1.7.0"
Code :
config/env file as
All these values are specified and verified by the log
Error as :
https://www.npmjs.com/package/s3-streamlogger/v/1.7.0
Please share an solution for the above issue.
The text was updated successfully, but these errors were encountered: