Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/getporter/aws-mixin
Porter mixin for the AWS CLI
https://github.com/getporter/aws-mixin
amazon aws mixin porter
Last synced: 4 months ago
JSON representation
Porter mixin for the AWS CLI
- Host: GitHub
- URL: https://github.com/getporter/aws-mixin
- Owner: getporter
- License: apache-2.0
- Created: 2019-07-03T23:13:53.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-06-11T00:21:19.000Z (5 months ago)
- Last Synced: 2024-06-20T07:53:01.996Z (5 months ago)
- Topics: amazon, aws, mixin, porter
- Language: Go
- Homepage: https://getporter.org/mixins/aws
- Size: 2.3 MB
- Stars: 2
- Watchers: 4
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-cnab - aws-mixin - Porter mixin for the AWS CLI by @get_porter (Implementations / Porter)
README
# AWS CLI Mixin for Porter
This is a mixin for Porter that provides the AWS CLI.
[![Build Status](https://dev.azure.com/getporter/porter/_apis/build/status/aws-mixin?branchName=main)](https://dev.azure.com/getporter/porter/_build/latest?definitionId=5&branchName=main)
The [Buckets Example](./examples/buckets) provides a full working bundle demonstrating how to use this mixin.
## Mixin Syntax
See the [AWS CLI Command Reference](https://docs.aws.amazon.com/cli/latest/reference/index.html#cli-aws) for the supported commands
```yaml
aws:
description: "Description of the command"
service: SERVICE
operation: OP
arguments:
- arg1
- arg2
flags:
FLAGNAME: FLAGVALUE
REPEATED_FLAG:
- FLAGVALUE1
- FLAGVALUE2
suppress-output: false
outputs:
- name: NAME
jsonPath: JSONPATH
```### Suppress Output
The `suppress-output` field controls whether output from the mixin should be
prevented from printing to the console. By default this value is false, using
Porter's default behavior of hiding known sensitive values. When
`suppress-output: true` all output from the mixin (stderr and stdout) are hidden.Step outputs (below) are still collected when output is suppressed. This allows
you to prevent sensitive data from being exposed while still collecting it from
a command and using it in your bundle.### 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.
```yaml
outputs:
- name: NAME
jsonPath: JSONPATH
```For example, if the `jsonPath` expression was `$[*].id` and the command sent the following to stdout:
```json
[
{
"id": "1085517466897181794",
"name": "my-vm"
}
]
```Then then output would have the following contents:
```json
["1085517466897181794"]
```---
## Examples
### Provision a VM
```yaml
aws:
description: "Provision VM"
service: ec2
operation: run-instances
flags:
image-id: ami-xxxxxxxx
instance-type: t2.micro
```### Create a Bucket
```yaml
aws:
description: "Create Bucket"
service: s3api
operation: create-bucket
flags:
bucket: my-buckkit
region: us-east-1
```