Skip to content

Commit

Permalink
Set default AWS region for CloudWatch Logs client initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
dmux committed Dec 19, 2024
1 parent 0e23ea7 commit d9c5b94
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
from datetime import datetime, timedelta
from typing import Any, Dict, List, Optional

Expand All @@ -14,8 +15,12 @@
SUFFIX,
)

DEFAULT_REGION = "us-east-1"

region_name = os.getenv("AWS_REGION", DEFAULT_REGION)

# Initialize the boto3 client for CloudWatch Logs
cloudwatch_logs_client = boto3.client("logs")
cloudwatch_logs_client = boto3.client("logs", region_name=region_name)


def _validate_cloudwatch_client(client: Any) -> bool:
Expand Down

0 comments on commit d9c5b94

Please sign in to comment.