Deployer Fails and Logs Error: "The ciphertext refers to a customer master key that does not exist"
Symptoms
Deployer is failing with error:
"npm" exited with code 1
Deployer logs contain error:
fusion:engine AccessDeniedException: The ciphertext refers to a customer master key that does not exist, does not exist in this region, or you are not allowed to access.
Bundle runs successfully in local.
Cause
A secret in the bundle within /environment/index.js
is not correctly encrypted or was not copied correctly into the file.
Solution
Ensure that all secrets are properly encrypted using the method described in How To Use Environment Variables and "Secrets" and can be decrypted successfully to the correct value.