Skip to content

Commit

Permalink
Merge pull request #20928 from austinvazquez/add-awslogs-create-strea…
Browse files Browse the repository at this point in the history
…m-docs

Add AWS logs driver awslogs-create-stream option doc
  • Loading branch information
thaJeztah authored Oct 3, 2024
2 parents 64b2c04 + 475eadf commit fa372c1
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

By default, the log driver creates 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 avoiding redundant AWS CloudWatch Logs API calls.

If `awslogs-create-stream` is set to `false` and the log stream does not exist, log persistence to CloudWatch
fails during container runtime, resulting in `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 fa372c1

Please sign in to comment.