runbooks 0.7.6__py3-none-any.whl → 0.7.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
runbooks/base.py CHANGED
@@ -5,6 +5,7 @@ This module provides common base classes and utilities used across
5
5
  all Cloud Foundations components including CFAT, inventory, and organizations.
6
6
  """
7
7
 
8
+ import os
8
9
  from abc import ABC, abstractmethod
9
10
  from datetime import datetime
10
11
  from pathlib import Path
@@ -86,7 +87,10 @@ class CloudFoundationsBase(ABC):
86
87
 
87
88
  def _create_session(self) -> boto3.Session:
88
89
  """Create boto3 session with appropriate configuration."""
89
- session_kwargs = {"profile_name": self.profile}
90
+ # Use environment variable first, then profile parameter, then default
91
+ profile = os.environ.get('AWS_PROFILE') or self.profile
92
+
93
+ session_kwargs = {"profile_name": profile}
90
94
  if self.region:
91
95
  session_kwargs["region_name"] = self.region
92
96