aws / aws/aws-cdk

Custom Resource Provider Framework v2 - New 'Secured' Version?

Open
#21,184 5 comments 2 reactions 0 assignees View on GitHub
@aws-cdk/custom-resources effort/medium feature-request p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the feature

The breaking changes that were implmented in 2.31.0 to the custom resource framework highlighted that the 'understanding' of many users and the 'intention' of construct may well have been in conflict. For those ( like myself who had expereince with custom resources from pre cdk times ), it seemed logical that the lambda was responsible for doing the same set of tasks that it had always done, including reporting back to cloudfomation with its status etc ( so it def needed a URL ). The fact that the framework does actually send the repsonseURL to the lambda in the event infomation reinforced this view and thousands if not millions of lambda invocations later.. all had been fine till 2.31.0

The rationale for the change was not bad, and all would have been fine if everyone had been using the framework that the writers had intended it to be used. But you know, consumers of code will use it in ways that you never intend.. :-)

What I would like to propose is creating a new version of the provider framework, and depreciating the old one.. The new one, would definately not pass the URL. At the same time, some extra information in the documentation to make the intention of the provider framework more explicit.

This would give us the ability to leave our exisiting code running, and migrate it in a timely fashion.. ( before cdkv3.0 ), write new code in the 'more secure' way. For many folks the security risk is minimal, but it is a real thing.

@kaizencc , @jnawk

https://github.com/aws/aws-cdk/issues/21058

custom-resources: Custom resource provider framework

### Use Case

Allow a staged migration to a more 'secure' use of the custom resource, that is non breaking.

### Proposed Solution

Copy the exisiting costruct and apply the same change that was done in 2.31 to that module, while still leaving the old one.
( it might be an opportunity to add other code / features as well if requried )

### Other Information

_No response_

### Acknowledgements

- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### CDK version used

2.31.0

### Environment details (OS name and version, etc.)

Generic.

Contributor guide

Open the contributing guide

Research direction

Start by reading the custom resource provider framework context and linked issue #21058. Define the scope for a versioned provider that preserves the existing behavior while omitting the response URL, then document the intended usage and migration path; completion should include implementation and coverage for both provider versions.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.