serverless-localstack icon indicating copy to clipboard operation
serverless-localstack copied to clipboard

Cloudwatch event schedule not working.

Open AtithAlur opened this issue 6 years ago • 1 comments

I am trying to create a ruby lambda and linking it to an event schedule which is set to trigger every minute. Lambda is working properly. I am able to deploy and invoke as expected. But, the event rule is not created. I tried the same serverless configuration on AWS without localstack, it works. Please help me to resolve this

serverless.yml:

service: reminders

provider:
  name: aws
  runtime: ruby2.5

plugins:
  - serverless-localstack
  - serverless-ruby-package

custom:
  rubyPackage:
    alwaysCrossCompileExtensions: true
  localstack:
    stages:
      - dev
    host: http://serverless-localstack
    lambda:
      mountCode: False

package:
  excludeDevDependencies: false
  include:
    - lib/**

functions:
  confirmSchoolReminder:
    handler: lib/confirm_school_reminder.ConfirmSchoolReminder.perform
    events:
      - schedule: rate(1 minute)

sls deploy --stage dev:

sls invoke local -f confirmSchoolReminder:

ws events list-rules --endpoint http://serverless-localstack:4587 --region us-east-1:

┆Issue is synchronized with this Jira Task by Unito

AtithAlur avatar Dec 18 '19 02:12 AtithAlur

Hi @whummer. I think this issue is related with https://github.com/spulec/moto/issues/2831. Localstack will probably work out of the box, don't you think ?

gmcrocetti avatar Mar 24 '20 01:03 gmcrocetti

closing the issue due to inactivity. The issue should have been fixed in the meantime, and doesn't relate to the serverless-localstack plugin, but rather to LocalStack.

steffyP avatar Sep 18 '23 09:09 steffyP