aws / aws/aws-cdk

(aws-ecs): (stop deregistration of previous task definition revision)

Open
#24,372 5 comments 7 reactions 0 assignees View on GitHub
@aws-cdk/aws-ecr @aws-cdk/aws-ecs feature-request p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
1d 19h
Merged PRs (30d)
74

Description

### Describe the bug

Hello,
I'm facing a challenge with my CI/CD deployment process. When deploying a new ECR image to a service, a new task definition revision is created and deployed to the ECS service. The problem is that the previous task definition revision gets deregistered automatically. This is not what I want because I want to keep it as "ACTIVE" to allow for rollback in case something goes wrong.

My question is: How can I prevent the automatic deregistration of the previous task definition revision?
### Expected Behavior

.

### Current Behavior

.

### Reproduction Steps

.

### Possible Solution

_No response_

### Additional Information/Context

_No response_

### CDK CLI Version

2.66.1

### Framework Version

_No response_

### Node.js Version

18

### OS

mac

### Language

Typescript

### Language Version

_No response_

### Other information

_No response_

Contributor guide

Open the contributing guide

Research direction

Begin with the ECS service deployment, task-definition revisions, and ECR image deployment described in the issue, using CDK CLI 2.66.1 as the reported context. Determine whether deregistration is caused by CDK or an AWS ECS lifecycle rule; done means documenting a reproducible expected outcome for retaining the previous revision.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.