Code Monkey home page Code Monkey logo

go-aws-sam's Introduction

go-aws-storage

(local) usage of AWS S3 via Cobra and/or AWS CLI.

  • create bucket via AWS CLI
aws s3api create-bucket --bucket my-bucket --endpoint-url http://localhost:4566 --profile localstack
  • create bucket via CLI
go run main.go --config=config.yaml create-bucket --name=my-bucket [--public=true]

  • list buckets via AWS CLI
aws s3api list-buckets --endpoint-url http://localhost:4566 --profile localstack
  • list buckets via CLI
go run main.go --config=config.yaml list-buckets

  • put object via AWS CLI
aws s3api put-object --bucket my-bucket --key sample.png --body sample.png \
    --endpoint-url http://localhost:4566 --profile localstack
  • put object via CLI
go run main.go put-objects --bucket=my-bucket --key=sample_1.png --key=sample_2.png

  • list objects via AWS CLI
aws s3api list-objects --bucket my-bucket --endpoint-url http://localhost:4566 --profile localstack
  • list objects via CLI
go run main.go --config=config.yaml list-objects --bucket=my-bucket

  • get object via AWS CLI
aws s3api get-object --bucket my-bucket --key sample.png new-sample.png \
    --endpoint-url http://localhost:4566 --profile localstack OUT_FILENAME
  • get object via CLI
go run main.go get-object --config=config.yaml --bucket=my-bucket --key=sample.png --path=.

  • pre-sign URL via AWS CLI
aws s3 presign s3://BUCKET/KEY --endpoint-url http://localhost:4566 --profile localstack
  • pre-sign URL via CLI
go run main.go assign-url --config=config.yaml --bucket=my-bucket --key=sample.png

  • delete object via AWS CLI
aws s3api delete-object --bucket my-bucket --key sample.png --endpoint-url http://localhost:4566 --profile localstack
  • delete object via CLI
go run main.go delete-object --config=config.yaml --bucket=my-bucket --key=sample.png

  • delete bucket via AWS CLI
aws s3api delete-bucket --bucket my-bycket --endpoint-url http://localhost:4566 --profile localstack
  • delete bucket via CLI
go run main.go delete-bucket --config=config.yaml --bucket=my-bucket


โ€ป References:

go-aws-sam's People

Contributors

oleksiivelychko avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.