> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# circleci/serverless-framework

Add the Serverless Framework CLI to your serverless deployment pipeline with ease. Easily and automatically test and deploy serverless applications to your favorite cloud provider.


## Commands

### setup

Install and authenticate with the Serverless CLI.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `mirror` | enum | us | Select the geo-location for the download mirror. By default the value will be `us`, do not change if on CircleCI Cloud. Switch to `cn` for the China hosted mirror. |
| `version` | string |  | Specify the version of the Serverless Framework CLI to install. By default, the latest version will be used. |

## Executors

### default

Highly cached minimal Ubuntu docker designed for CircleCI with Python and Node.js installed.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `python-version` | string | 3.13-node | Select your python version or any of the available tags here: https://hub.docker.com/r/cimg/python.
 |

## Examples

### simple_deploy_aws

Use the Serverless orb's "setup" command to install the Serverless Framework CLI and authenticate with your account if an API key is provided. This example shows how to construct a custom "deploy" job using the Serverless and AWS CLI orbs to deploy an app to AWS.


```yaml
version: '2.1'
orbs:
  aws-cli: circleci/aws-cli@3.1
  serverless-framework: circleci/serverless-framework@2.0
jobs:
  deploy:
    executor: serverless-framework/default
    steps:
      - checkout
      - aws-cli/setup
      - serverless-framework/setup
      - run:
          command: serverless deploy -v
          name: deploy
workflows:
  deploy:
    jobs:
      - deploy
```

### test_and_deploy_node_aws

Make use of the Node, AWS CLI, and Serverless Framework orbs to test and deploy your serverless Node.js applications.


```yaml
version: '2.1'
orbs:
  aws-cli: circleci/aws-cli@3.1
  node: circleci/node@5.0.2
  serverless-framework: circleci/serverless-framework@2.0
jobs:
  deploy:
    executor: serverless-framework/default
    steps:
      - checkout
      - aws-cli/setup
      - serverless-framework/setup
      - run:
          command: serverless deploy -v
          name: deploy
workflows:
  deploy:
    jobs:
      - node/test:
          version: 16.14.2
      - deploy:
          requires:
            - node/test
```