Skip to Content
Infrastructure as Code Cookbook
book

Infrastructure as Code Cookbook

by Stephane Jourdan, Pierre Pomès
February 2017
Intermediate to advanced
440 pages
8h 45m
English
Packt Publishing
Content preview from Infrastructure as Code Cookbook

Enabling CloudWatch Logs for Docker with Terraform

CloudWatch Logs is a log aggregation service by Amazon you can use to send your logs to. It's very useful to keep some logs centralized, share access to them, receive alarms when errors happen, or simply store them safely. We'll see how to create a CloudWatch Log group and use it to stream logs from a Docker container logs inside it.

Getting ready

To step through this recipe, you will need the following:

  • A working Terraform installation
  • An AWS provider configured in Terraform (refer to the previous recipes)
  • An Internet connection
  • A Docker Engine running on Linux for the optional usage demonstration

How to do it…

Let's say we want the log group to be named docker_logs, and that we want to keep those logs ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Infrastructure as Code

Infrastructure as Code

Kief Morris
Implementing Modern DevOps

Implementing Modern DevOps

David Gonzalez, Danny Varghese

Publisher Resources

ISBN: 9781786464910