Skip to content

Instantly share code, notes, and snippets.

@vatshat
vatshat / put_log_events.py
Last active January 29, 2020 16:04
Example of how to upload logs to CloudWatch using best practices to avoid throttling
import json
import sys
import boto3
import time
## boto3 client
logs = boto3.client('logs', region_name='eu-west-1')
## Define log group and log stream. Default log group for glue logs and logstream defined dynamically upon job run.
log_group = "my_custom_log_group"