Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time

Alpine AWS CLI Docker Image

Docker image for AWS CLI based on the alpine Docker image.

Local Usage

Credentials can be passed to the Docker container through the following environment variables:


Assuming that these variables are already populated on your machine, you would list all your defined lambda functions by issuing the command:

docker run --rm -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY grycap/aws-cli lambda list-functions

Further information is available in the AWS CLI documentation.

Usage in AWS Lambda via SCAR

You can run AWS CLI in AWS Lambda via SCAR using the following procedure:

  1. Modify the configuration file scar-aws-cli.yaml to include your keys and initialize the lambda function
scar init -f scar-aws-cli.yaml
  1. Invoke the Lambda function with the parameters that you want to execute in the aws-cli
scar run -f scar-aws-cli.yaml lambda list-functions