serverless icon indicating copy to clipboard operation
serverless copied to clipboard

Support for AWS EventBridge Pipes

Open bradwood opened this issue 3 years ago • 12 comments

Is there an existing issue for this?

  • [X] I have searched existing issues, it hasn't been reported yet

Use case description

AWS recently announced EventBridge Pipes

I would like to be able to add an "Enrichment Lambda" and "Target Lambda" to an AWS EventBridge Pipe using the serverless framework.

Proposed solution (optional)

No response

bradwood avatar Feb 09 '23 07:02 bradwood

@bradwood, thanks for reporting that. Can you propose how do you envision providing support for this in the Framework. What would be the new properties added to the configuration and hat would be the effect in generated CloudFormation stack?

medikoo avatar Feb 09 '23 08:02 medikoo

@medikoo -- I don't have a strong view on it -- my interest in the serverless framework is more as a PO for a team that uses the framework.

bradwood avatar Feb 09 '23 14:02 bradwood

@medikoo I wrote an example configuration.

input sls template

resources:
  Resources:
    MyPipe:
      Type: AWS::Pipes::Pipe
      Properties:
        RoleArn: !Ref AllowSendingToTargetRole
        Source: !Ref MyTable
        Target: !Ref MyEventBus

output CF template

{
  "Type" : "AWS::Pipes::Pipe",
  "Properties" : {
    "RoleArn": "arn:aws:iam::000000000000:role/allow-sending-to-target-role",
    "Source": "arn:aws:dynamodb:ap-northeast-2:000000000000:table/my-table",
    "Target": "arn:aws:events:ap-northeast-2:000000000000:event-bus/my-event-bus"
  }
}

This is an example template containing only minimum properties(required). Maybe someone can improve to use things later:

  • enrichment
  • source params
  • target params

reference:

cmygray avatar Feb 20 '23 08:02 cmygray

@cmygray it clearly defines what needs to end in CF template. Do you think we need to support any dedicated configuration properties for that? If so what should they be?

medikoo avatar Feb 20 '23 18:02 medikoo

For me the enrichment use case and binding a lambda to it is of critical importance as this is the lambda:everything_else configuration that is most important to manage inside the serverless framework.

bradwood avatar Feb 20 '23 18:02 bradwood

@medikoo

Here are configurations, not required but should be supported to use EventBrigePipe full features:

  • SourceParameter (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipesourceparameters.html)
  • TargetParameter (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipetargetparameters.html)
  • Enrichment
  • EnrichmentParameter (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pipes-pipe-pipeenrichmentparameters.html)

cmygray avatar Feb 21 '23 03:02 cmygray

Can you propose the Serverless Framework configuration properties that should be added to ensure the best support?

medikoo avatar Feb 21 '23 11:02 medikoo

Hi @medikoo @cmygray @bradwood, Could I have any updates on the issue? I am curious about it. Thanks

yuhongliu82 avatar May 31 '23 03:05 yuhongliu82

@yuhongliu82 please see my previous comment

medikoo avatar May 31 '23 08:05 medikoo

Note that terraform support is pretty close to being released -- perhaps this can give some suggestions on an implementation approach in serverless?

https://github.com/hashicorp/terraform-provider-aws/issues/28153

bradwood avatar May 31 '23 13:05 bradwood

+1 It's been over an year now. Are pipes still not supported?

s1mrankaur avatar Jun 05 '24 01:06 s1mrankaur

Just FYI, There seems to be a plugin available https://github.com/distinction-dev/serverless-pipes, however has some existing issues and limited support for sources/targets. It'd be nice if it's available as part of the framework itself. @medikoo @bradwood

s1mrankaur avatar Jun 27 '24 17:06 s1mrankaur