Report this

What is the reason for this report?

Use s3-streamlogger with DigitalOcean Spaces

Posted on September 24, 2018

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!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.