Giter Club home page Giter Club logo

Comments (3)

coopernurse avatar coopernurse commented on July 30, 2024

I'm interested in this feature too and may take a crack at it on my fork. I'll post an update here if I have something working if others want to help test it.

from kappa.

coopernurse avatar coopernurse commented on July 30, 2024

Got something working today. Does kappa own the event sources specified in the file? If so it seems odd to specify the arn in the yml file up front. I deviated slightly from the existing pattern in Context._create_event_sources() and introduced a notion of type - here's the example yaml:

---
name: kappa-cron
environments:
  dev:
    profile: xyz
    region: us-west-2
    event_sources:  
      - type: cloudwatch
        name: hello-cron-dev
        schedule: rate(1 minute)
        description: cron to run this lambda function every minute
        enabled: true
lambda:
  description: Kappa sample lambda that runs every minute
  handler: simple.handler
  runtime: python2.7
  memory_size: 128
  timeout: 3

The add() method does three things:

  • events.put_rule
  • lambda.add_permission
  • events.put_targets

The assumption is that the rule is owned by kappa and can be removed if/when the lambda function is removed.

Any comments on the above? I could revert to the arn convention, but keeping things like the account id out of the yaml file seems good if we can avoid it.

The alternative would look like this (I removed some irrelevant sections for comparison):

---
name: kappa-cron
environments:
  dev:
    event_sources:  
      - arn: arn:aws:events:us-west-2:1234567890:rule/hello-cron-dev
        schedule: rate(1 minute)
        description: cron to run this lambda function every minute
        enabled: true

from kappa.

coopernurse avatar coopernurse commented on July 30, 2024

Ok - PR has been filed:

#69

from kappa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.