Hey folks, just got set up with Seed and it’s supe...
# help
s
Hey folks, just got set up with Seed and it’s super cool! In my Lambda service, I have Lambdas that are triggered off HTTP events, as well as Lambdas that are triggered off Cloudwatch event rules (
cron
rate
, etc). In my Seed console, I only see the HTTP triggered Lambdas. What happens to Lambdas that are triggered off of other event types, such as Cloudwatch? Are they not deployed currently? Any info or pointers to the docs here would be appreciated. Thanks!
r
You can deploy both, we have both via Seed so something mustn't be quite right. Are you using SST?
p
Hey Ross, thanks for replying! I'm Pranav, Sanket's co-founder. So we used
sls
to set up the project and our
serverless.yml
. Would that affect how the events are defined and lead to inconsistencies in the
.yml
file?
r
No problem, either way, there's no reason you shouldn't be able to deploy cron triggered lambdas. Can you share the serverless.yml so we can see if there's anything wrong there?
p
yeah sure, here's an example function that runs on cron events:
Copy code
scheduledDailySlackDigest:
    handler: ScheduleDailySlackDigest.handler
    timeout: 60
    maximumRetryAttempts: 0
    warmup:
      default:
        enabled: false
    events:
      - schedule:
          rate: cron(0/1 13 * * ? *)
and here's a function that's an HTTP endpoint:
Copy code
addToSlack:
    handler: HandleAddToSlack.handler
    timeout: 30
    events:
      - http:
          method: post
          path: addtoslack
          cors:
            origin: "*"
            headers:
              - Content-Type
              - X-Amz-Date
              - Authorization
              - X-Api-Key
              - X-Amz-Security-Token
              - X-Amz-User-Agent
            allowCredentials: true
any thoughts on why the former wouldn't be showing up in the serverless stack resources?
f
Hey @Pranav Badami, a couple of quick things u can check: • if u run
sls package
locally and open up the generated CloudFormation template, do u see
scheduledDailySlackDigest
in there? • if u do, open up the build log on SEED, expand the
serverless deploy
step, you should see a list of deployed functions near the bottom. Is
scheduledDailySlackDigest
in there?