Skip to content

Implement support for Lambda resource-based policies #2659

@philchristensen

Description

@philchristensen

Is your feature request related to a problem?

I'm trying to use ACK to create a Lambda function that is invoked by an EventBridge cron event. When using EventBridge (or SNS) to invoke a Lambda, we need to modify the resource permissions to allow the event.amazonaws.com (or sns/amazonaws.com) service to invoke the function.

Describe the solution you'd like
Terraform provides an aws_lambda_permission object, it seems like it would be best to follow this and create a Permission CRD for the Lambda ACK Controller.

Also, FWIW, a number of AI tools I've tried have hallucinated that this object exists in ACK anyway 🤦🏽

Describe alternatives you've considered
Alternatively to above, you could add a policy attribute to the Function CRD instead of making a new object type.

Also, since this is all inside a Helm chart, I've tried valiantly to create a Kubernetes Job that calls aws lambda add-permission but it's pretty ugly, and I don't know if I can use it yet as is.

Metadata

Metadata

Assignees

Labels

service/lambdaIndicates issues or PRs that are related to lambda-controller.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions