Skip to content
This repository was archived by the owner on Sep 20, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/emd/utils/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def inner(*args, **kwargs):
@catch_aws_credential_errors
def print_aws_profile():
console = Console()
sts = boto3.client("sts")
sts = boto3.client("sts", region_name=get_current_region())
response = sts.get_caller_identity()
profile_name = os.environ.get("AWS_PROFILE","default")
account_id = response["Account"]
Expand Down
2 changes: 1 addition & 1 deletion src/emd/utils/upload_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ def upload_pipeline_source_to_s3(
region
)
zip_buffer = ziped_pipeline()
s3 = boto3.client('s3')
s3 = boto3.client('s3', region_name=region)
s3.upload_fileobj(zip_buffer, bucket, s3_key)
return f"s3://{bucket}/{s3_key}"
3 changes: 2 additions & 1 deletion src/pipeline/utils/aws_service_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import json
import hashlib
import boto3
from emd.utils.aws_service_utils import get_current_region
logger = get_logger(__name__)


Expand All @@ -22,7 +23,7 @@ def check_aws_environment():
"""
try:
# Try to create a boto3 client and make a simple API call
sts = boto3.client('sts')
sts = boto3.client("sts", region_name=get_current_region())
response = sts.get_caller_identity()
logger.info("AWS environment is properly configured.")
account_id = response['Account']
Expand Down
3 changes: 2 additions & 1 deletion src/pipeline/utils/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import logging
import argparse
import boto3
from emd.utils.aws_service_utils import get_current_region

logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -54,7 +55,7 @@ def download_file_from_s3_by_s5cmd(s3_file_path, local_file_path):

def upload_dir_to_s3(bucket_name, local_dir_name):
logger.info(f"Uploading {local_dir_name} to {bucket_name} bucket")
s3 = boto3.client('s3')
s3 = boto3.client('s3', region_name=get_current_region())
for root, dirs, files in os.walk(local_dir_name):
for file in files:
local_path = os.path.join(root, file)
Expand Down