skypilot
skypilot copied to clipboard
[Core][AWS] Allow specification of IAM roles for resources.
This PR updates the schema config to allow specification of IAM roles for resources based on the skypilot naming conventions.
Address: https://github.com/skypilot-org/skypilot/issues/3487
In ~/.sky/config.yaml
:
- When setting for the controller and all other resources (
default
)
aws:
remote_identity:
sky-serve-controller-*: skypilot-v1-fake
"*": skypilot-default-fake
- When setting for everything by specifying a default
aws:
remote_identity:
"*": skypilot-default-fake
- When setting for everything by specifying just the
remote_identity
via string
aws:
remote_identity: skypilot-default-fake
- When first profile doesn't match it chooses the next in line if viable
aws:
remote_identity:
does-not-match: skypilot-default-fake
"*": skypilot-default-fake
Tested (run the relevant ones):
- [x] Code formatting:
bash format.sh
- [x] Any manual or new tests for this PR (please specify below)
- tested running in all 4 configs in AWS
- Nothing set
- setting different controller and default values
- setting default only
- setting two profile names where the first one doesn't match to ensure it selects the viable candidate in order
- tested running in all 4 configs in AWS
- [ ] 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:
bash tests/backward_comaptibility_tests.sh
Due note the quotes required around *
to meet yaml file specifications: "*"
.
e.g.
aws:
remote_identity:
"*": skypilot-default-fake
@Michaelvll Fixed as suggested. Thanks for the improvements!