Reputation: 92
Having four API in one lambda function
https://*******.amazonaws.com/dev/candidate
,https://*******.amazonaws.com/dev/incrementalfile
,https://*******.amazonaws.com/dev/increment
,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
Upvotes: 0
Views: 718
Reputation: 9605
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
Upvotes: 2