Created
July 4, 2026 15:11
-
-
Save nivleshc/8dd1f93d72075bd873c58c570aa4b321 to your computer and use it in GitHub Desktop.
This gist contains code from lambda-function.py, which is part of the blog-amazon-macie-custom-eventbridge-events repository.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| import base64 | |
| import gzip | |
| import os | |
| import logging | |
| from datetime import datetime, timezone | |
| import boto3 | |
| # Configure logging | |
| logger = logging.getLogger() | |
| logger.setLevel(logging.INFO) | |
| # Initialise the EventBridge client | |
| eventbridge_client = boto3.client("events") | |
| # Environment variables | |
| EVENT_BUS_NAME = os.environ.get("EVENT_BUS_NAME", "default") | |
| EVENT_SOURCE = os.environ.get("EVENT_SOURCE", "custom.macie.job-status") | |
| DETAIL_TYPE = os.environ.get("DETAIL_TYPE", "Macie Classification Job Status Change") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment