skypilot icon indicating copy to clipboard operation
skypilot copied to clipboard

[Core][AWS] Allow specification of IAM roles for resources.

Open JGSweets opened this issue 10 months ago • 1 comments

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
  • [ ] 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

JGSweets avatar Apr 26 '24 17:04 JGSweets

Due note the quotes required around * to meet yaml file specifications: "*".

e.g.

aws:
  remote_identity:
    "*": skypilot-default-fake

JGSweets avatar May 02 '24 04:05 JGSweets

@Michaelvll Fixed as suggested. Thanks for the improvements!

JGSweets avatar May 07 '24 00:05 JGSweets