By Strider
I am using s3-streamlogger along with DigitalOcean Spaces, and in order to create logs into my bucket I use the following code:
import { S3StreamLogger } from 's3-streamlogger';
const s3Stream = new S3StreamLogger({
bucket: "mybucket",
config: {
endpoint: 'nyc3.digitaloceanspaces.com'
},
access_key_id: "MY_ACCESS_KEY",
secret_access_key: "MY_SECRET_KEY",
tags: {type: "error", project: "myproject"}
});
s3Stream.write("hello S3");
In the configuguration, if I omit the tags: {type: "error", project: "myproject"} an InvalidArgument: Null exception is raised.
Is this a normal behavior or an incompatibility with S3?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hey friend!
To me that sounds like the application is kicking back the configuration, but if you’re seeing more that indicates our servers returned that message, please correct me as I may be wrong. I’m taking a shot in the dark here because I’m just not big into using object storage in it’s intended ways myself, but is there a chance that when you remove that line the configuration is kicking back because of the trailing comma at the end of the secret_access_key line?
I realize it could be a very stupid question and no help at all, but I figured it was worth a try as no one else was weighing in on it.
Jarland
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.