-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Need a feature for getting IAM Role's trust policy alone in CLI. #8909
Comments
Python/3.12.5 Linux/5.10.223-211.872.amzn2.x86_64 source/x86_64.alpine.3 |
Hi nrssutharsanan@, thanks for reaching out. As you have mentioned, the $ aws iam get-role --role-name already includes the Trust Policy. To isolate it, you could do Client side filtering ( https://docs.aws.amazon.com/cli/v1/userguide/cli-usage-filter.html#cli-usage-filter-client-side ). An example command would be: |
Hey @adev-code -- So having to just get the Trust Policy alone , just like get managed policy etc , which even can be got in get-role, but still we do have separate command for.it, so similar ly if I have a separate command to fetch only the trust policy, it is better for me to go and do updates at scale. |
Hi @nrssutharsanan, I have submitted a feature request to the IAM team to create an operation that gives the Trust Policy of the role. Please refer to an SDK or AWS CLI changelog (https://raw.githubusercontent.com/aws/aws-cli/v2/CHANGELOG.rst) for updates about this going forward. |
Hey @adev-code , will this be solved by IAM team or can I solve as well ? |
Hi @nrssutharsanan, the IAM team would provide updates on the SDK or AWS CLI changelog (https://raw.githubusercontent.com/aws/aws-cli/v2/CHANGELOG.rst) |
Greetings! It looks like this issue hasn’t been active in longer than five days. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one. |
Describe the feature
Need a feature request for getting IAM Role's trust policy alone in CLI.
As of now we have to perform iam get-role CLI command and then manipulate to get the role's trust policy alone.
I feel its valuable to add a new feature / command to get role's trust policy alone.
Suggested code --
aws iam get-role-trust-policy --role-name <<your role name>> _
_Use Case
This is required when we want to do some manipulations to the existing Trust policy and add new policies , since the CLI gives only the option to overwrite an existing policy.
Proposed Solution
No response
Other Information
No response
Acknowledgements
CLI version used
2.17.47
Environment details (OS name and version, etc.)
Windows/Linux,etc
The text was updated successfully, but these errors were encountered: