This is a minimal Serverless Framework Python template that provides a simple starting point for building serverless applications with Python.
- Configured to use Python 3.9 runtime
- Includes the aws-lambda-powertools-python Lambda layer for metrics, logging and tracing
- Uses serverless-slic-watch-plugin plugin to add CloudWatch Alarms and Dashboards
- Uses serverless-python-requirements plugin for packaging Python dependencies
- Uses the serverless-iam-roles-per-function plugin to manage IAM roles separately for each function
To use this template, you need to have the following software installed on your machine:
- Node.js (v16 or later), so you can run The Serverless Framework
- Python (v3.9 or later)
- Docker (if using native dependencies that must be built for the target Linux architecture used by AWS Lambda)
You also need to have an AWS account and AWS CLI configured with your credentials.
To create a new service based on this template, use the following command:
serverless create --template-url https://github.com/fourTheorem/serverless-minimal-starter --path <service-name>
Replace <service-name>
with the desired name of your new service. This will create a new directory with the specified name, containing the files from this template.
To deploy the service, use the following command:
serverless deploy --stage <stage> --region <region>
Replace <stage>
and <region>
with the desired values. The default stage is dev
and the default region is eu-west-1
.
To delete all resources created as part of this service, use the following command:
serverless remove --stage <stage> --region <region>
This project is licensed under the Apache 2.0 License - see the LICENSE.md file for details.