AWS Newbie here
I have to host my python scripts via gitlab CI as a lambda and trigger it by cloudwatch on AWS.
I am following the following tutorials:
- https://docs.gitlab.com/ee/user/project/clusters/serverless/aws.html
- https://serverless.com/blog/serverless-python-packaging/
From the first tutorial, I am taking just the .gitlab-ci.yml file and adding it to the tutorial shown in the second tutorial (but instead of python 3.6, I am choosing 3.7 as the runtime)
I have the following serverless.yml file
service: numpy-test
provider:
name: aws
runtime: python3.7
functions:
numpy:
handler: handler.main
plugins:
- serverless-python-requirements
custom:
pythonRequirements:
dockerizePip: non-linux
package:
exclude:
- venv/**
and the following .gitlab-ci.yml file:
image: node:latest
stages:
- deploy
production:
stage: deploy
before_script:
- npm config set prefix /usr/local
- npm install -g serverless
- npm install --save serverless-python-requirements
script:
- serverless deploy
environment: production
When I push the .gitlab-ci.yml file, it runs without any errors.
I can see the lambda function created in my AWS lambda. When I connect this lambda with the Cloudwatch so that the lambda gets triggered every 1 minute, I get the following error in the Logs:
I also have a requirements.txt file and it has
numpy==1.18.2
I have the following files/folders in my directory:

Can someone please help me out with this and explain me the mistake I am doing and how can it be corrected?
Edit 1
I edited the serverless.yml file as pointed out by makozaki, and now when I push it in the repo, the CI file fails giving the following error:








