-
Notifications
You must be signed in to change notification settings - Fork 253
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
Support to reference DynamoDB table latest stream ARN in Lambda EventSourceMapping #1938
Comments
Hi @ghorak-happening - thanks for bringing up this issue! We're currently tracking dynamic resource references (option3 ) in #1576 - it should be possible to implement by leveraging k8s dynamic clients and relying on imports such as https:/aws-controllers-k8s/lambda-controller/blob/main/go.mod#L6. Feel free to pick up the issue if this is something you'd like to contribute to! |
Issues go stale after 180d of inactivity. |
Closing in favor of #1576 |
@a-hilaly: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Problem
DynamoDB Latest Stream ARN is autogenerated by AWS and cannot be constructed upfront. That makes it very difficult to create AWS Lambda EventSourceMapping with DynamoDB Stream as a source.
The
EventSourceARN
supports several AWS resources, as per documentation (https:/aws-controllers-k8s/lambda-controller/blob/6a1f71e1b68480530e9a9ac1389b8a0f7bc30499/apis/v1alpha1/event_source_mapping.go#L69):Unfortunately, the
EventSourceRef
is implemented to support only managed kafka cluster ARNs:https:/aws-controllers-k8s/lambda-controller/blob/6a1f71e1b68480530e9a9ac1389b8a0f7bc30499/apis/v1alpha1/generator.yaml#L137
I'm happy to contribute this feature, but would need direction towards best solution.
Possible solutions
Re-use existing
EventSourceRef
field.To ignore defined field reference kind in the
generator.yaml
and implement custom logic to resolve proper ARN.This would need to be done as custom code and would clash with code generators. Not sure if this is even possible,
Create
xxxEventSourceRef
fields for each reference kind.ARN resolving would need to be done with hooks in this case.
Extend the core
code-generator
to support multiple resource kinds as field referencesSomething like this:
ACK Custom resource names are unique within namespace, regardless of the resource kind, so the implementation should be straightforward.
The text was updated successfully, but these errors were encountered: