I have a SAM template.yaml
like below:
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Resources:
GathererFunction:
Type: 'AWS::Serverless::Function'
Properties:
Handler: main.handler
Runtime: nodejs14.x
Events:
GathererDataSchedule:
Type: Schedule
Properties:
Schedule: 'rate(1 minute)'
GathererBucket:
Type: AWS::S3::Bucket
Properties:
BucketName: gatherer-bucket
I run sam validate
and it comes back fine.
I try to run sam deploy
and the deployment fails when creating the schedule. Error says: ScheduleExpression is not valid. (Service: AmazonCloudWatchEvents; Status Code: 400; error code: ValidationException;
ScheduleExpression is not valid. (Service: AmazonCloudWatchEvents; Status Code: 400; error code: ValidationException;
I've also tried Schedule: rate('1 minute')
and Schedule: rate(1 minute)
Where am I going wrong?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.