Skip to content
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

feat(pipes-targets): add lambda function #30271

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

WtfJoke
Copy link
Contributor

@WtfJoke WtfJoke commented May 20, 2024

Issue # (if applicable)

Closes #30270.

Reason for this change

Lambda Function target is not supported yet by pipes-targets.

Description of changes

  • Added LambdaFunction as a pipes target.
  • Default LambdaFunctionInvocationType to LambdaFunctionInvocationType.REQUEST_RESPONSE
  • Allowed grant Invoke on Lambda by Pipes

Description of how you validated changes

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions bot added repeat-contributor [Pilot] contributed between 3-5 PRs to the CDK feature-request A feature should be added or improved. p2 labels May 20, 2024
@aws-cdk-automation aws-cdk-automation requested a review from a team May 20, 2024 00:25
@WtfJoke WtfJoke force-pushed the addLambdaPipeTarget branch 3 times, most recently from 23db285 to 3aa03cc Compare May 20, 2024 01:01
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label May 20, 2024
This was referenced May 27, 2024
Copy link
Contributor

@RaphaelManke RaphaelManke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall it looks good to me. I added some minor improvement ideas.

const app = new App();
const stack = new Stack(app, 'TestLambdaFunctionStack');

const lambdaFunction = new lambda.Function(stack, 'MyLambda', {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't have to define a lambda. A string of an arn should be sufficient.

Copy link
Contributor Author

@WtfJoke WtfJoke Jun 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure? Shouldnt be the lambda be available for import? Because for the LambdaFunction#grantPush you need a reference to a lambda.IFunction.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: d9e571b
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. p2 pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. repeat-contributor [Pilot] contributed between 3-5 PRs to the CDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(pipes-targets): Add Lambda Function target for EventBridge pipes
3 participants