Identify and remove excessive unused OCI KMS Customer-Managed Keys (also known as Master Encryption Keys) from your Oracle Cloud Infrastructure (OCI) account in order to lower the cost of your monthly bill. Each key version incurs charges, so ensuring your KMS Vault maintains a reasonable number of keys (ideally ≤ 15) avoids unnecessary monthly costs.
optimisation
Excessive unused Customer-Managed Keys (CMKs) increase Oracle Cloud Infrastructure (OCI) costs because each key version incurs a monthly charge. Deleting keys beyond what's needed (more than 15) optimizes spending while maintaining only necessary cryptographic resources.
Recover your encrypted data: once a Customer-Managed Key (CMK) is deleted, all data encrypted under that key becomes unrecoverable. Oracle Cloud Infrastructure (OCI) allows a minimum waiting period of 7 days to verify whether your keys are still needed to decrypt the data before these are completely deleted. The deletion can be canceled any time before the waiting period expires.
Audit
To determine whether there is an excessive number of unused Customer-Managed Keys (CMKs) available within your OCI account, perform the following operations:
Remediation / Resolution
Oracle Cloud Infrastructure (OCI) allows a waiting period between 7 and 30 days before a Customer-Managed Key (CMK) is completely deleted and unrecoverable. The deletion can be canceled any time before the waiting period expires. To schedule deletion for any unused (disabled) Customer-Managed Key available within your OCI account, perform the following operations:
References
- Oracle Cloud Infrastructure Documentation
- Managing Keys
- Deleting a Key
- Oracle Cloud Infrastructure CLI Documentation
- compartment list
- vault list
- vault get
- key list
- key schedule-deletion