0

I'm declaring my function as

dp-batch-expiration:
  name: dp-batch-expiration
  role: dpBatchExpiration
  handler: c.c.o.l.e.BatchExpiration::handleRequest
  events:
    - schedule:
        method: scheduler
        rate:
          - cron(0 12 * * ? *)

Resource config is

Resources:
  batchExpiration:
    Type: AWS::IAM::Role
    Properties:
      Path: /
      RoleName: batch-expiration
      AssumeRolePolicyDocument:
        Version: "2012-10-17"
        Statement:
          - Effect: Allow
            Principal:
              Service:
                - lambda.amazonaws.com
                - scheduler.amazonaws.com
            Action: sts:AssumeRole
      # note that these rights are needed if you want your function to be able to communicate with resources within your vpc
      ManagedPolicyArns:
        - arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess
        - arn:aws:iam::aws:policy/CloudWatchLambdaInsightsExecutionRolePolicy
        - arn:aws:iam::aws:policy/SecretsManagerReadWrite
        - arn:aws:iam::aws:policy/AWSXrayWriteOnlyAccess
        - arn:aws:iam::aws:policy/CloudWatchLogsFullAccess
        - arn:aws:iam::aws:policy/AmazonEC2FullAccess
        - arn:aws:iam::aws:policy/AWSLambda_FullAccess

The function is created without errors, but when I inspect the function via Amazon UI no trigger is created. What am I doing wrong?

0

Browse other questions tagged or ask your own question.