Task

Task is a better makefile. It allows you to declare command lines and dependencies.

After installation start with:

task --init

Then create some task in Taskfile.yml.

In each directory, where you find a Taskfile.yml, the list command will show you the descriptions of all available tasks:

task -ls

Snippets

Using a Systems Manager Parameter Store value as variable

This puts the parameter “/goa-serverless/handler” into the Taskfile variable “FN”

  fastdeploy:
    desc: Deploy only lambda
    deps: [build]
    vars:
      FN:      
        sh: aws ssm get-parameter --name "/goa-serverless/handler" --query "Parameter.Value" --output text
    cmds:
      - aws lambda update-function-code --function-name  {{.FN}} --zip-file fileb://dist/main.zip

See also