-
Notifications
You must be signed in to change notification settings - Fork 1
/
awscli-list-ecs-clusters.yaml
38 lines (33 loc) · 1.25 KB
/
awscli-list-ecs-clusters.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
id: awscli-list-ecs-clusters
namespace: company.team
tasks:
- id: awscli
type: io.kestra.plugin.aws.cli.AwsCLI
accessKeyId: "{{ secret('AWS_ACCESS_KEY_ID') }}"
secretKeyId: "{{ secret('AWS_SECRET_ACCESS_KEY') }}"
region: us-east-1
outputFiles:
- output.json
commands:
- aws ecs list-clusters --query 'clusterArns[*]'
- aws ecs list-clusters > output.json
extend:
title: Automate tasks on AWS using the AWS CLI
description: >-
This flow demonstrates how you can use the AWS CLI plugin to automate
various tasks on AWS.
The task `aws` below runs two commands. They both list ECS clusters in the
region `us-east-1` using the `aws ecs list-clusters` command. The output is
a JSON array of cluster ARNs.
1. The first task uses the `--query` parameter to filter the output to only
show the cluster ARNs.
2. The second task stores the output to a file called `output.json`, making
it available for further processing or download.
This flow assumes AWS credentials stored as secrets `AWS_ACCESS_KEY_ID` and
`AWS_SECRET_ACCESS_KEY`.
tags:
- AWS
ee: false
demo: true
meta_description: "This flow demonstrates how you can use the AWS CLI plugin to
automate various tasks on AWS. "