- Newest
- Most votes
- Most comments
Hi, thanks for reaching out.
When the CloudFormation stack is deleted, Secrets Manager is called with the force-delete-without-recovery option in order to avoid this scenario. I'm unsure why that did not work in your particular case. If you can private message me more details (i.e. Request ID's) I would be happy to trace this down.
As you mentioned, you can fix this by calling delete-secret from the CLI using the same --force-delete-without-recovery option that is involked when deleting the stack - https://docs.aws.amazon.com/cli/latest/reference/secretsmanager/delete-secret.html
I deleted the secret via CLI and --force-delete-without-recovery and ran the pipeline again several times successfully.
Then checked the last commit which led to the error and recognized that I also changed the logical id in the template:
Credentials: <- THIS
Type: 'AWS::SecretsManager::Secret'
With the ID change the secret was still there when the stack has been created.
I guess this is my fault and the CF template for the secret is working correctly.
Thank you for your support and sorry for the confusion.
Hi svshane,
As i gone through the discussion but didn't understand how the issue related to "Secret already exists on AWS Secrets Manager" get resolved as i am facing the same when i trying to re-deploy code on server. Please let us know how you can resolve this issue.
Along with this i have one more query that, it is required to delete the secrets forcefully via command line before deploying the code to server via cloudformation/serverless?
Waiting for your valuable response....
Thanks
Edited by: Raman88 on May 20, 2021 7:12 AM
Relevant content
- Accepted Answerasked 10 months ago
- asked a year ago
- asked 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago