Cloudwatch Schedule Event Not Created

I am trying to create a cloudwatch event scheduler to ping my lambda functions every 5 minutes to keep them warm. I can create a rule from the aws console. I am running version 1.26.1 and deploying a Java based lambda which is NAT’d. I followed the docs example but nothing gets created

Code Snippet:

functions:
      alerts:
            handler: com.mycompany.lambda.AlertSMSHandler
            description: Processes Notification alert POST and alerts query
            package:
              individually: true
              artifact: ./alerts/target/alerts-1.0-SNAPSHOT.jar
            role: xxxxxx
            vpc:
              securityGroupIds:
                 - xxxxxx
              subnetIds: 
                - xxxx
                - xxxx
            events:
              - schedule:
                  name: 'alertping'
                  enabled: true
                  description: 'Pings alert lambda every 5 minutes to keep it warm'
                  rate: rate(5 minutes)
                  input:
                    key1: 'ping'

Any suggestions please???

OK I solved it. When you do a serverless deploy --functions alerts it does nothing. When you run the full Monty of serverless -deploy it works cause it also uploads the Cloudformation template to s3. Why shouldn’t --function work?