aws-cost-calculator-cli 1.5.1__tar.gz → 1.5.2__tar.gz

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.

Potentially problematic release.


This version of aws-cost-calculator-cli might be problematic. Click here for more details.

Files changed (20) hide show
  1. {aws_cost_calculator_cli-1.5.1/aws_cost_calculator_cli.egg-info → aws_cost_calculator_cli-1.5.2}/PKG-INFO +1 -1
  2. {aws_cost_calculator_cli-1.5.1 → aws_cost_calculator_cli-1.5.2/aws_cost_calculator_cli.egg-info}/PKG-INFO +1 -1
  3. {aws_cost_calculator_cli-1.5.1 → aws_cost_calculator_cli-1.5.2}/cost_calculator/executor.py +22 -11
  4. {aws_cost_calculator_cli-1.5.1 → aws_cost_calculator_cli-1.5.2}/setup.py +1 -1
  5. {aws_cost_calculator_cli-1.5.1 → aws_cost_calculator_cli-1.5.2}/COST_CALCULATION_METHODOLOGY.md +0 -0
  6. {aws_cost_calculator_cli-1.5.1 → aws_cost_calculator_cli-1.5.2}/LICENSE +0 -0
  7. {aws_cost_calculator_cli-1.5.1 → aws_cost_calculator_cli-1.5.2}/MANIFEST.in +0 -0
  8. {aws_cost_calculator_cli-1.5.1 → aws_cost_calculator_cli-1.5.2}/README.md +0 -0
  9. {aws_cost_calculator_cli-1.5.1 → aws_cost_calculator_cli-1.5.2}/aws_cost_calculator_cli.egg-info/SOURCES.txt +0 -0
  10. {aws_cost_calculator_cli-1.5.1 → aws_cost_calculator_cli-1.5.2}/aws_cost_calculator_cli.egg-info/dependency_links.txt +0 -0
  11. {aws_cost_calculator_cli-1.5.1 → aws_cost_calculator_cli-1.5.2}/aws_cost_calculator_cli.egg-info/entry_points.txt +0 -0
  12. {aws_cost_calculator_cli-1.5.1 → aws_cost_calculator_cli-1.5.2}/aws_cost_calculator_cli.egg-info/requires.txt +0 -0
  13. {aws_cost_calculator_cli-1.5.1 → aws_cost_calculator_cli-1.5.2}/aws_cost_calculator_cli.egg-info/top_level.txt +0 -0
  14. {aws_cost_calculator_cli-1.5.1 → aws_cost_calculator_cli-1.5.2}/cost_calculator/__init__.py +0 -0
  15. {aws_cost_calculator_cli-1.5.1 → aws_cost_calculator_cli-1.5.2}/cost_calculator/api_client.py +0 -0
  16. {aws_cost_calculator_cli-1.5.1 → aws_cost_calculator_cli-1.5.2}/cost_calculator/cli.py +0 -0
  17. {aws_cost_calculator_cli-1.5.1 → aws_cost_calculator_cli-1.5.2}/cost_calculator/drill.py +0 -0
  18. {aws_cost_calculator_cli-1.5.1 → aws_cost_calculator_cli-1.5.2}/cost_calculator/monthly.py +0 -0
  19. {aws_cost_calculator_cli-1.5.1 → aws_cost_calculator_cli-1.5.2}/cost_calculator/trends.py +0 -0
  20. {aws_cost_calculator_cli-1.5.1 → aws_cost_calculator_cli-1.5.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aws-cost-calculator-cli
3
- Version: 1.5.1
3
+ Version: 1.5.2
4
4
  Summary: AWS Cost Calculator CLI - Calculate daily and annual AWS costs across multiple accounts
5
5
  Home-page: https://github.com/yourusername/cost-calculator
6
6
  Author: Cost Optimization Team
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aws-cost-calculator-cli
3
- Version: 1.5.1
3
+ Version: 1.5.2
4
4
  Summary: AWS Cost Calculator CLI - Calculate daily and annual AWS costs across multiple accounts
5
5
  Home-page: https://github.com/yourusername/cost-calculator
6
6
  Author: Cost Optimization Team
@@ -11,22 +11,33 @@ def get_credentials_dict(config):
11
11
  Extract credentials from config in format needed for API.
12
12
 
13
13
  Returns:
14
- dict with access_key, secret_key, session_token
14
+ dict with access_key, secret_key, session_token, or None if profile is 'dummy'
15
15
  """
16
16
  if 'aws_profile' in config:
17
- # Get temporary credentials from SSO session
18
- session = boto3.Session(profile_name=config['aws_profile'])
19
- credentials = session.get_credentials()
20
- frozen_creds = credentials.get_frozen_credentials()
17
+ # Skip credential loading for dummy profile (API-only mode)
18
+ if config['aws_profile'] == 'dummy':
19
+ return None
21
20
 
22
- return {
23
- 'access_key': frozen_creds.access_key,
24
- 'secret_key': frozen_creds.secret_key,
25
- 'session_token': frozen_creds.token
26
- }
21
+ # Get temporary credentials from SSO session
22
+ try:
23
+ session = boto3.Session(profile_name=config['aws_profile'])
24
+ credentials = session.get_credentials()
25
+ frozen_creds = credentials.get_frozen_credentials()
26
+
27
+ return {
28
+ 'access_key': frozen_creds.access_key,
29
+ 'secret_key': frozen_creds.secret_key,
30
+ 'session_token': frozen_creds.token
31
+ }
32
+ except Exception:
33
+ # If profile not found, return None (API will handle)
34
+ return None
27
35
  else:
28
36
  # Use static credentials
29
- creds = config['credentials']
37
+ creds = config.get('credentials', {})
38
+ if not creds:
39
+ return None
40
+
30
41
  result = {
31
42
  'access_key': creds['aws_access_key_id'],
32
43
  'secret_key': creds['aws_secret_access_key']
@@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
5
5
 
6
6
  setup(
7
7
  name='aws-cost-calculator-cli',
8
- version='1.5.1',
8
+ version='1.5.2',
9
9
  packages=find_packages(),
10
10
  install_requires=[
11
11
  'click>=8.0.0',