0

Having four API in one lambda function

  1. https://*******.amazonaws.com/dev/candidate,
  2. https://*******.amazonaws.com/dev/incrementalfile,
  3. https://*******.amazonaws.com/dev/increment,
  4. https://*******.amazonaws.com/dev/s3upload

These are my 4 APIs and I have to schedule these 4 API Gateway for every day at 10:30 AM from Monday to Friday but I am unable to find the solution for scheduling API gateway. here is my .yml file

service: ****
plugins:
  - serverless-plugin-typescript
provider:
  name: aws
  runtime: nodejs10.x
  memorySize: 1024
  stage: dev
  region: ***
  timeout: 60
 
functions:
  ****:
    handler: src/server.*****Handler
    events:
      - http: 'ANY /{proxy+}'
      - cors: true

Need to schedule http event but not able to find the solution I also used 'node schedule' but that is not working

1 Answer 1

2

Assuming you wanna call API Gateway endpoints everyday day at 10:30 AM. You can use CloudWatch Event Rule and register target a step machine that calls the API gateway

Introducing Amazon API Gateway service integration for AWS Step Functions

Periodically Start a State Machine Execution Using CloudWatch Events

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.