logo
aws-cli
Amazon Web Service (AWS) command line interface
cloudbuild
Updated 2 years ago
1.0

aws-cli

This function provides AWS's CLI version 2.7.18 and is based on the official AWS CLI image on Docker Hub. The following additional packages are installed:

  • wget
  • git
  • curl

Examples

Function Configuration
functions:
- id: aws-cli
  image: gcr.io/direktiv/functions/aws-cli:1.0
  type: knative-workflow
Basic
- id: aws-cli
  type: action
  action:
    function: aws-cli
    secrets: ["awsAccess", "awsSecret", "awsRegion"]
    input: 
      access-key: jq(.secrets.awsAccess)
      secret-key: jq(.secrets.awsSecret)
      region: jq(.secrets.awsRegion)
      commands:
      - command: aws ec2 describe-instances

Secrets

  • awsAccess: AWS access key (IAM)
  • awsSecret: AWS secret key (IAM)
  • awsRegion: AWS region where the commands run

Errors

TypeDescription
io.direktiv.output.errorTemplate error for output generation of the service
io.direktiv.ri.errorCan not create information object from request
io.direktiv.command.errorCommand execution failed

input

NameTypeDefaultDescriptionExample
access-keystringAWS access key.ABCABCABCDABCABCABCD
secret-keystringAWS secret key.Abcd45sa01234+ThIsIsSuPeRsEcReT
regionstringus-east-1Region the commands should be executed in.eu-central-1
filesarrayFile to create before running commands.
commandsarrayArray of commands.

Quick Reference

Quick Copy
-  id : aws-cli
 image : gcr.io/direktiv/functions/aws-cli:1.0
 type : knative-workflow
Copy and paste to pull this image