Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
'''
This script sets a retention on all the logGroups that don't have one set
'''
import boto3
import logging
# Retention it will be set to
RETENTION = 30

Keybase proof

I hereby claim:

  • I am hermes-pimentel on github.
  • I am hermespimentel (https://keybase.io/hermespimentel) on keybase.
  • I have a public key ASA971Ff9OF6C8RkieT5V_AjY-yCKihJJsC-yu2xjVtxlAo

To claim this, I am signing this object:

#!/bin/bash
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
# the Software, and to permit persons to whom the Software is furnished to do so.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
@hermes-pimentel
hermes-pimentel / msk-lambda-firehose-transform-logs-to-opensearch.py
Last active April 18, 2023 19:33
msk-lambda-firehose-transform-logs-to-opensearch.py
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
# the Software, and to permit persons to whom the Software is furnished to do so.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
@hermes-pimentel
hermes-pimentel / msk-servicediscovery-http.py
Last active January 9, 2023 22:17
msk-servicediscovery-http.py
import json
import boto3
from functools import reduce
import logging
logger = logging.getLogger()
logger.setLevel(logging.INFO)
client = boto3.client('kafka')