You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ec2): check for actions instead of policies. (#3694)
## Problem
We currently check if certain policies are attached to the IAM role in
order to determine if the necessary permissions exist on the instance to
open an SSM session. However, this can be done more fine-grained.
## Solution
https://github.com/aws/aws-toolkit-vscode/blob/a9d64f3a448480f8fed9ba96b3da33631c298265/src/ecs/util.ts#L33-L52
Leverage the approach done by ECS to check for specific actions rather
than policies.
- Restructure testing framework to look at actions instead of policies.
- Refactor ECS code to pull out shared functionality to
`src/shared/remoteSession.ts`.
- Refactor existing code in the `src/ec2/model.ts` file to utilize the
approach demonstrated above.
- Add back `packages/core/src/shared/systemUtilities.ts` file since some
of it is used here.
<!---
REMINDER:
- Read CONTRIBUTING.md first.
- Add test coverage for your changes.
- Update the changelog using `npm run newChange`.
- Link to related issues/commits.
- Testing: how did you test your changes?
- Screenshots
-->
## License
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.
---------
Co-authored-by: JadenSimon <[email protected]>
Co-authored-by: Justin M. Keyes <[email protected]>
Co-authored-by: Weinstock <[email protected]>
0 commit comments