aws / aws/aws-cdk

aws-apprunner-alpha: redesign `Service` construct to unify `Source.fromEcr()` and `Source.fromEcrPublic()` methods

Open
#33,013 2 comments 0 reactions 0 assignees View on GitHub
@aws-cdk/aws-apprunner effort/medium feature-request p3
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the bug

The current design of the `Service` construct in `aws-apprunner-alpha` has significant inconsistencies, particularly between `Source.fromEcr` and `Source.fromEcrPublic`. This issue proposes a redesign to unify these methods into a single interface, dynamically determining the repository type (public or private) using regex. For context, see the related issue: [#32974](https://github.com/aws/aws-cdk/issues/32974#issuecomment-2600733863)

### Regression Issue

- [ ] Select this option if this issue appears to be a regression.

### Last Known Working CDK Version

_No response_

### Expected Behavior

see above

### Current Behavior

see above

### Reproduction Steps

see above

### Possible Solution

_No response_

### Additional Information/Context

_No response_

### CDK CLI Version

2.176.0

### Framework Version

_No response_

### Node.js Version

22.12.0

### OS

Ubuntu 24.04.1

### Language

TypeScript

### Language Version

_No response_

### Other information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reading the aws-apprunner-alpha Service construct and comparing the Source.fromEcr() and Source.fromEcrPublic() interfaces. Review the discussion in related issue #32974, then clarify the unified interface and repository-type detection requirements before changing anything. Done means the redesign is agreed and both source paths follow the same interface.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.