Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

self.delete() when updating is not needed in the S3Object example #3

Open
benbridts opened this issue Feb 6, 2018 · 1 comment
Open
Assignees

Comments

@benbridts
Copy link
Contributor

The update method at https://github.com/iRobotCorporation/cfn-custom-resource/blob/master/examples/S3Object.py#L83 checks of the bucket or path changes, and triggers a delete if this happens.

This delete can be removed, because CloudFormation will call the custom resource with a delete event if the physical resource id changes. Calling the put() method will do that.

Removing the delete will also make sure the delete is only triggered when the stack is in UPDATE_COMPLETE_CLEANUP_IN_PROGRESS. Making sure that no data is deleted if a Rollback happens.

@benbridts benbridts changed the title self.delete() whenupdating is not needed in the S3Object example self.delete() when updating is not needed in the S3Object example Feb 6, 2018
@benkehoe
Copy link
Member

benkehoe commented Feb 7, 2018

I didn't realize that, but it makes sense.

@benkehoe benkehoe self-assigned this Feb 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants