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 CLI v2.15.30 needs --policy-name as required argument instead of optional when performing kms get-key-policy #8835

Closed
TejasRGitHub opened this issue Aug 1, 2024 · 2 comments
Assignees
Labels

Comments

@TejasRGitHub
Copy link

Describe the bug

While performing aws kms get-key-policy , for all the other CLI versions, the --policy-name is an optional argument but for v2.15.30 this is a required argument.

Also I couldn't find the documentation of v2.15.30.

For the latest aws cli v2, this is an optional argument as well. Thus, I think it is a bug in AWS CLI v2.15.30

Expected Behavior

--policy-name arg should be optional

Current Behavior

--policy-name arg is required

Reproduction Steps

  1. Create a KMS key
  2. Install AWS CLI v2.15.30 ( https://docs.aws.amazon.com/cli/latest/userguide/getting-started-version.html )
  3. Open terminal , perform aws kms get-key-policy --key-id <YOUR_KEY_ID>
  4. This should fail with the usage instructions

Possible Solution

No response

Additional Information/Context

No response

CLI version used

2.15.30

Environment details (OS name and version, etc.)

mac

@TejasRGitHub TejasRGitHub added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Aug 1, 2024
@tim-finnigan tim-finnigan self-assigned this Aug 2, 2024
@tim-finnigan tim-finnigan added the investigating This issue is being investigated and/or work is in progress to resolve the issue. label Aug 2, 2024
@tim-finnigan
Copy link
Contributor

Thanks for reaching out. It looks like this was change introduced in 2.15.31:

  • api-change:kms: Adds the ability to use the default policy name by omitting the policyName parameter in calls to PutKeyPolicy and GetKeyPolicy

So from 2.15.31 onward the policyName can be omitted. Closing as not a bug but expected behavior based on the version. Will also link documentation for reference:

@tim-finnigan tim-finnigan added kms and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. needs-triage This issue or PR still needs to be triaged. bug This issue is a bug. labels Aug 2, 2024
Copy link

github-actions bot commented Aug 2, 2024

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants