Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AWS] Adding aws assume role option, and env var detection #4550

Merged

Conversation

clayrosenthal
Copy link
Contributor

Adding an option for an AWS identity that is an assumed role, set by using the source_profile and role_arn options in your ~/.aws/config. Also refactored the identity option check to a for loop as it was getting repetitive. Also made it so the env var identity is recognized by sky check

Tested (run the relevant ones):

  • Code formatting: bash format.sh
  • Any manual or new tests for this PR (please specify below)
    • Testing with env vars:
sky check aws     
Checking credentials to enable clouds for SkyPilot.
  AWS: enabled                              
    Hint: AWS env is set. It will work if you use AWS only, but will cause problems if you want to use multiple clouds. To set up static credentials, try: aws configure
  • Testing with assumed role:
sky check aws
Checking credentials to enable clouds for SkyPilot.
  AWS: enabled                              
    Hint: AWS assume-role is set. It will work if you use AWS only, but will cause problems if you want to use multiple clouds. To set up static credentials, try: aws configure
  • Testing with custom credential process:
sky check aws                                                                            
Checking credentials to enable clouds for SkyPilot.
  AWS: enabled                              
    Hint: AWS custom-process is set. It will work if you use AWS only, but will cause problems if you want to use multiple clouds. To set up static credentials, try: aws configure
  • All smoke tests: pytest tests/test_smoke.py
  • Relevant individual smoke tests: pytest tests/test_smoke.py::test_fill_in_the_name
  • Backward compatibility tests: conda deactivate; bash -i tests/backward_compatibility_tests.sh

Copy link
Collaborator

@romilbhardwaj romilbhardwaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @clayrosenthal!

sky/clouds/aws.py Outdated Show resolved Hide resolved
@romilbhardwaj romilbhardwaj merged commit fd1ac0e into skypilot-org:master Jan 10, 2025
18 checks passed
@clayrosenthal clayrosenthal deleted the aws-assume-role-option branch January 10, 2025 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants