name: aws-sam-cli
version: git
summary: The AWS SAM CLI tool for the AWS Serverless Application Model
description: >
  `sam` is the AWS CLI tool for managing Serverless applications written
  with the AWS Serverless Application Model (SAM).
  SAM CLI can be used to test functions locally, start a local API Gateway
  from a SAM template, validate a SAM template, fetch logs, generate sample
  payloads for various event sources, and generate a SAM project in your
  favorite Lambda Runtime.

license: Apache-2.0

base: core18

grade: stable
confinement: strict

plugs:
  personal-files:
    read:
      - $HOME/.aws

parts:
  launchers:
    plugin: dump
    source: snap/local/launchers
    organize:
      "*": bin/

  aws-sam-cli:
    plugin: python
    python-version: python3
    python-packages:
      - awscli
    requirements:
      - requirements/base.txt
    source: .

apps:
  aws-sam-cli:
    adapter: full
    command-chain:
      - bin/launcher.sh
    command: bin/sam
    #plugs:
    #  - home
    environment:
      LC_ALL: C.UTF-8
      LANG: C.UTF-8