aws / aws/aws-codedeploy-agent

Provide a way to run a cleanup script after a deployment error

Open
#63 5 comments 14 reactions 0 assignees View on GitHub
feature-request
Dominant language
Rust
Stars
337
Forks
195
Avg merge
10h 54m
Merged PRs (30d)
4

Description

CodeDeploy is missing a mechanism for doing cleanup after a deployment error. This could be implemented as another lifecycle event that is triggered only when a deployment fails for some reason. This reason could be e.g. a non-zero exit status of a hook script, a timeout or a user-triggered cancellation of the deployment.

The idea of this originates from [a more specific issue regarding ASG lifecycle scripts](https://github.com/awslabs/aws-codedeploy-samples/issues/42). In that case, an auto-scaling group is left in an unclean state after an error during a deployment.

One remotely similar mechanism for error handling is the `rescue` block in Ansible:
http://docs.ansible.com/ansible/playbooks_blocks.html

Contributor guide

Open the contributing guide

Research direction

Start by reading the CodeDeploy lifecycle event behavior described here and the linked ASG lifecycle scripts issue 42. Compare the proposed failure cases—hook errors, timeouts, and cancellations—with Ansible's rescue-block reference. Done would require an agreed design for a cleanup event and its behavior across those failure cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud, devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.