awslog

command module
v0.0.0-...-8835833 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

README


{ "image": "direktiv/awslog", "desc": "Writes a log line to aws cloudwatch logs with provided log stream and group." }

AWSLog

Writes a log line to aws cloudwatch logs with provided log stream and group.

Direktiv

An example workflow of using the container on Direktiv.

id: log-to-aws
functions:
- id: log
  image: direktiv/awslog:v1
description: "Log a message to AWS cloudwatch"
states:
- id: log-hello
  type: action
  action:
    function: log
    input: jq(.)

Input

The input needed to run the above workflow properly is the following:

input:
  key: jq(.secrets.AWS_KEY)
  secret: jq(.secrets.AWS_SECRET)
  region: "us-east-2"
  "log-group": "direktiv"
  "log-stream": "direktiv"
  message: "Hello"

Output

If the action is successful, no output will be logged to the direktiv container. But the log should appear under the log stream on AWS.

Error

In the case that an error is encountered, it will present in the following format:

{
    "errorCode": "com.awslog.error",
    "errorMsg": "Something went wrong"
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL