Set Lambda Function input > Constant in .yml

I’m able to create schedule rules with relative ease with the following :

    handler: handler.poll
      - schedule:
          rate: rate(1 minute)
          enabled: true

However what I’d like to be able to do is also pass in some constant JSON text. They give you the option in the AWS console like this:

Is there just a schedule param I’m missing?

Found this

1 Like

As discussed on Gitter, this is solved with

It should be in the v1.2.0 release.

1 Like

Do you know when v1.2.0 is going live?
And is it going to work with more coplex json something like that


v1.2.0 is due any moment now

It should work with any JSON/YML object you put in there.

1 Like

Hi @rowanu I’ve just used serverless 1.2.0 and the JSON input worked like a charm :slight_smile:
I was wondering do you know if I can change the name of the CloudWatch Rule as currently is something like that:
It will be great if I can change the name to something else.

1 Like

Good to hear it worked, thanks for reporting back.

Unfortunately there’s no way to change the name that I’m aware of. It has
to be unique, and it’s helpful to see what resource relates to a specific

Why do you care what it is named? The name has no material impact on the
functionality, so shouldn’t matter.

If you have some reporting requirements, better to change what you display
at the reporting level rather than expose the plumbing of your service.

It’s not that important just I like to have my CloudWatch Rules with proper naming using special syntax.
But the most important was that now I can pass my JSON input and it works :slight_smile:
Thanks one more time.

1 Like