Skip to content

Commit 475eadf

Browse files
committed
Add AWS logs driver awslogs-create-stream option doc
Signed-off-by: Austin Vazquez <[email protected]>
1 parent c74c180 commit 475eadf

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

content/manuals/engine/logging/drivers/awslogs.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,27 @@ $ docker run \
127127
> Your AWS IAM policy must include the `logs:CreateLogGroup` permission before
128128
> you attempt to use `awslogs-create-group`.
129129

130+
### awslogs-create-stream
131+
132+
By default, the log driver creates the AWS CloudWatch Logs stream used for container log persistence.
133+
134+
Set `awslogs-create-stream` to `false` to disable log stream creation. When disabled, the Docker daemon assumes
135+
the log stream already exists. A use case where this is beneficial is when log stream creation is handled by
136+
another process avoiding redundant AWS CloudWatch Logs API calls.
137+
138+
If `awslogs-create-stream` is set to `false` and the log stream does not exist, log persistence to CloudWatch
139+
fails during container runtime, resulting in `Failed to put log events` error messages in daemon logs.
140+
141+
```console
142+
$ docker run \
143+
--log-driver=awslogs \
144+
--log-opt awslogs-region=us-east-1 \
145+
--log-opt awslogs-group=myLogGroup \
146+
--log-opt awslogs-stream=myLogStream \
147+
--log-opt awslogs-create-stream=false \
148+
...
149+
```
150+
130151
### awslogs-datetime-format
131152

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

0 commit comments

Comments
 (0)