I have a very basic custom resource which invokes Lambda during a deployment. Everything works just fine but when I try to remove the stack, Cloudwatch loggroup for this particular Lambda function is not removed. If I don’t deploy custom resource, loggroup is removed as expected.
If I check this from the cloudformation events, it should be removed but it is not…
DELETE_COMPLETE AWS::Logs::LogGroupXXXLogGroup
DELETE_IN_PROGRESS AWS::Logs::LogGroupXXXLogGroup
Is there something special related to this which I need to return as Cloudwatch Response Object that I am missing now?
var response = require('cfn-response');
.then(res => {
console.log(res);
return response.send(event, context, response.SUCCESS, {
status: res.status
});