aws-sdk-client-go is a Go client CLI for AWS services.
This CLI is auto generated from the AWS SDK Go v2 service client.
The AWS CLI is very useful, but it requires too many CPU and memory resources to boot up. This client is a simplified alternative to the AWS CLI for limited use cases.
aws-sdk-client-go does not release binaries. Because the binary containing all services is too large, you need to build the client yourself to support the services you want to use.
The client is built by a configuration file gen.yaml
.
services:
ecs:
- DescribeClusters
- DescribeTasks
firehose:
- DescribeDeliveryStream
- ListDeliveryStreams
kinesis:
# all methods of the service
Keys of services
are AWS service names (github.com/aws/aws-sdk-go-v2/service/*
), and values are method names of the service client (for example, s3
is s3.Client). If you don't specify the method names, all methods of the service client are generated.
To build the client, run the following commands (or simply run make
):
$ go generate ./cmd/aws-sdk-client-gen .
$ go build -o your-client ./cmd/aws-sdk-client-go/main.go
go generate ./cmd/aws-sdk-client-gen .
generates the generator bygen.yaml
.go build -o your-client ./cmd/aws-sdk-client-go/main.go
builds your client.
$ aws-sdk-client-go [service] [method] [input]
service
: AWS service name.method
: Method name of the service client.input
: JSON input for the method.
The output is JSON format.
$ aws-sdk-client-go
$ aws-sdk-client-go ecs
$ aws-sdk-client-go ecs DescribeClusters '{"Cluster":"default"}'
The third argument is JSON input for the method. If the method does not require input, you can omit the third argument (implicitly {}
passed).
aws-sdk-client-go is a simple wrapper of the AWS SDK Go v2 service client. Its usage is the same as that of the AWS SDK Go v2.
$ aws-sdk-client-go ecs DescribeClusters help
See https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/ecs#Client.DescribeClusters
MIT
Fujiwara Shunichiro