avatarTeri Radichel

Summary

The web content discusses troubleshooting an InvalidKeyId error when adding a parameter to AWS Systems Manager Parameter Store, despite the key existing.

Abstract

The article addresses a common issue encountered when using AWS Systems Manager Parameter Store, where an InvalidKeyId error occurs even when the key is confirmed to exist. The author, Teri Radichel, shares personal experience with this error, which was initially confusing due to having two variables with the same name. The solution involved ensuring the correct key value was used, emphasizing the importance of passing the full Amazon Resource Name (ARN) of the key rather than just the key name to avoid typos. Radichel suggests copying the ARN directly from the AWS KMS service to prevent such errors. The article also provides resources for further learning in cybersecurity, including a series on automating cybersecurity metrics, related stories on bugs, AWS security, and secure coding, as well as free content on jobs in cybersecurity. Additionally, Radichel offers professional services through 2nd Sight Lab and invites readers to follow her for updates and sign up for her email list.

Opinions

  • The author believes that the InvalidKeyId error can be misleading, as it may occur even when the key exists, leading to confusion.
  • Radichel emphasizes the importance of verifying the key value and using the full ARN to avoid such errors.
  • She recommends a best practice of copying the ARN from the AWS KMS service to prevent typos in the key name.
  • The author values the sharing of knowledge and experience, as evidenced by her series on automating cybersecurity metrics and other related content.
  • Radichel positions herself as an expert in the field, citing her credentials, which include being an author, presenter, award recipient, and the founder of 2nd Sight Lab.
  • She encourages engagement and professional collaboration by offering services such as penetration tests, security assessments, and consulting calls, as well as inviting followers to connect on various social media platforms.

(InvalidKeyId) when calling the PutParameter operation: Invalid keyId xxxxxxxxxxx (Service: AWSKMS; Status Code: 400; Error Code: NotFoundException; Request ID: xxxxx Proxy: null)

Getting an InvalidKeyID error when trying to add a parameter to AWS Systems Manager Parameter Store — but the key exists

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

⚙️ Check out my series on Automating Cybersecurity Metrics | Code.

🔒 Related Stories: Bugs | AWS Security | Secure Code

💻 Free Content on Jobs in Cybersecurity | ✉️ Sign up for the Email List

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This error is confusing because the key passed into the key-id parameter in this command does exist:

aws ssm put-parameter --name $ami_latest --value $image_id --type SecureString --key-id $key --overwrite

The problem I had in this particular case was that I had two variables with the same name, which became apparent when I printed out the key value.

Normally, this error would indicate there’s a typo in the key name, it’s not set, or it does not exist for some other reason. Also make sure you pass in the full ARN, not just the key name. The best thing you can do to prevent typos is to navigate to the KMS service, click on the key, copy the ARN, and paste it into your code to prevent typos.

Follow for updates.

Teri Radichel | © 2nd Sight Lab 2022

About Teri Radichel:
~~~~~~~~~~~~~~~~~~~~
⭐️ Author: Cybersecurity Books
⭐️ Presentations: Presentations by Teri Radichel
⭐️ Recognition: SANS Award, AWS Security Hero, IANS Faculty
⭐️ Certifications: SANS ~ GSE 240
⭐️ Education: BA Business, Master of Software Engineering, Master of Infosec
⭐️ Company: Penetration Tests, Assessments, Phone Consulting ~ 2nd Sight Lab
Need Help With Cybersecurity, Cloud, or Application Security?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
🔒 Request a penetration test or security assessment
🔒 Schedule a consulting call
🔒 Cybersecurity Speaker for Presentation
Follow for more stories like this:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
❤️ Sign Up my Medium Email List
❤️ Twitter: @teriradichel
❤️ LinkedIn: https://www.linkedin.com/in/teriradichel
❤️ Mastodon: @teriradichel@infosec.exchange
❤️ Facebook: 2nd Sight Lab
❤️ YouTube: @2ndsightlab
Invalidkeyid
Systemsmanager
AWS
Error Message
Kms
Recommended from ReadMedium