Skip to content

carolynvs/aws-mixin

 
 

Repository files navigation

AWS CLI Mixin for Porter

This is a mixin for Porter that provides the AWS CLI.

The Buckets Example provides a full working bundle demonstrating how to use this mixin.

Mixin Syntax

See the AWS CLI Command Reference for the supported commands

aws:
  description: "Description of the command"
  service: SERVICE
  operation: OP
  arguments:
  - arg1
  - arg2
  flags:
    FLAGNAME: FLAGVALUE
    REPEATED_FLAG:
    - FLAGVALUE1
    - FLAGVALUE2
  outputs:
  - name: NAME
    jsonPath: JSONPATH

Outputs

The mixin supports jsonpath outputs.

JSON Path

The jsonPath output treats stdout like a json document and applies the expression, saving the result to the output.

outputs:
- name: NAME
  jsonPath: JSONPATH

For example, if the jsonPath expression was $[*].id and the command sent the following to stdout:

[
  {
    "id": "1085517466897181794",
    "name": "my-vm"
  }
]

Then then output would have the following contents:

["1085517466897181794"]

Examples

Provision a VM

aws:
  description: "Provision VM"
  service: ec2
  operation: run-instances
  flags:
    image-id: ami-xxxxxxxx
    instance-type: t2.micro

Create a Bucket

aws:
  description: "Create Bucket"
  service: s3api
  operation: create-bucket
  flags:
    bucket: my-buckkit
    region: us-east-1

About

Porter mixin for the AWS CLI

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 84.3%
  • Makefile 15.7%