Git Product home page Git Product logo

devops-helpers's Introduction

devops-helpers

AWS

bucketname='bluebite-enablement-logging' for key in $(aws s3api list-objects --bucket "${bucketname}" --prefix "bluebite-enablement" --query "Contents[].{Object:Key}" --output text) ; do echo "$key" FILENAME=$($key | grep -o '.{36}$') echo $FILENAME #aws s3 mv s3://$bucketname/$key s3://$bucketname/access/$FILENAME done ``

  • Clear DynamoDB table: aws dynamodb scan --profile sts --region us-east-1 \ --table-name trident_stage_event \ --attributes-to-get "token" | \ jq -r ".Items[] | tojson" | \ tr '\n' '\0' | \ xargs -0 -I keyItem \ aws dynamodb delete-item --profile sts --region us-east-1 \ --table-name trident_stage_event \ --key=keyItem

  • Generate SSH Keypair: ssh-keygen -P "" -t rsa -b 4096 -m pem -f ~/.ssh/my-key-pair

    • -P: is for passphrase. Intentionally set to empty.
    • -t: Specifies the type of key to create. AWS EC2 Key Pair requires RSA. It's my experience that this pertains to the public key that is created.
    • -b: Specifies the number of bits in the key. The supported lengths are 1024, 2048, and 4096. If you connect using SSH while using the EC2 Instance Connect API, the supported lengths are 2048 and 4096.
    • -m: Specifies a key format for key generation. Setting a format of โ€œPEMโ€ when generating a supported private key type will cause the key to be stored in the legacy PEM private key format. AWS EC2 Key Pair need the legacy format
    • -f: Specifies the output filename and path of the key file

devops-helpers's People

Contributors

philipbankier avatar

Watchers

 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.