title: Serverless to AWS - Gitlab CICD
body: <p>I'm developing an application using <a href="https://serverless.com/" rel="nofollow noreferrer">Serveless Framework</a> and I want to deploy it in AWS using GitLab CICD.</p>
  
  <p>Following the best practises documentation I've setup a single repo with the following structure:</p>
  
  <pre><code>│
  ├── services
  │   ├── customer-api
  │   │    └── handler.js, serverless.yml
  │   └── payment-api
  │        └── handler.js, serverless.yml
  │
  ├── serverless-common.yml
  └── .gitlab-ci.yml
  
  </code></pre>
  
  <p>So inside of the services folder I've several folders (one for each api / lambda).
  I've also setup the following simple GitLab CI/CD</p>
  
  <pre><code>image: node:latest
  
  stages:
    - deploy
  
  dev:
    environment: dev
    stage: deploy
    before_script:
      - npm config set prefix /usr/local
      - npm install -g serverless
    script:
      - serverless deploy --stage dev --verbose
  
  </code></pre>
  
  <p>The problem that I've is that I want to deploy only the lambdas that have changes.</p>
  
  <p>Should I go directory by directory inside the services folder and run the <code>serverless deploy</code> for each api?:</p>
  
  <pre><code>  script:
      - cd customer-api
      - serverless deploy --stage dev --verbose
      - cd ..
      - cd payment-api
      - serverless deploy --stage dev --verbose
  </code></pre>
  
  <p>How are you managing serverless deployments using GitLab CI/CD? </p>