'How to remove deleted resource from cloudformation stack?

I deployed a stack to AWS but manually deleted some resources which causing the stack out of sync. I am able to use drift detection to detect the deleted resources. But how can I force the stack template to remove these resources?

I know I can import some resources to an existing stack manually via AWS console but how can I remove some from the stack?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source