Skip to content

Commit

Permalink
Add AWS logs driver awslogs-create-stream option doc
Browse files Browse the repository at this point in the history
Signed-off-by: Austin Vazquez <[email protected]>
  • Loading branch information
austinvazquez committed Sep 19, 2024
1 parent c74c180 commit 42c6ba3
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions content/manuals/engine/logging/drivers/awslogs.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,27 @@ $ docker run \
> Your AWS IAM policy must include the `logs:CreateLogGroup` permission before
> you attempt to use `awslogs-create-group`.

### awslogs-create-stream

Check warning on line 130 in content/manuals/engine/logging/drivers/awslogs.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Docker.HeadingSentenceCase] Use sentence case for headings: 'awslogs-create-stream'. Raw Output: {"message": "[Docker.HeadingSentenceCase] Use sentence case for headings: 'awslogs-create-stream'.", "location": {"path": "content/manuals/engine/logging/drivers/awslogs.md", "range": {"start": {"line": 130, "column": 5}}}, "severity": "WARNING"}

By default, the log driver will create the AWS CloudWatch Logs stream used for container log persistence.

Set `awslogs-create-stream` to `false` to disable log stream creation. When disabled, the Docker daemon assumes
the log stream already exists. A use case where this is beneficial is when log stream creation is handled by
another process thus avoiding redundant AWS CloudWatch Logs create stream API calls.

If disabled and log stream does not exist, then log persistence to CloudWatch will fail during container run time
with `Failed to put log events` error messages in daemon logs.

```console
$ docker run \
--log-driver=awslogs \
--log-opt awslogs-region=us-east-1 \
--log-opt awslogs-group=myLogGroup \
--log-opt awslogs-stream=myLogStream \
--log-opt awslogs-create-stream=false \
...
```

### awslogs-datetime-format

The `awslogs-datetime-format` option defines a multi-line start pattern in [Python
Expand Down

0 comments on commit 42c6ba3

Please sign in to comment.