All Projects → omerh → awsctl

omerh / awsctl

Licence: MIT License
Control AWS infrastructure easily from a single command line written in Go

Programming Languages

go
31211 projects - #10 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to awsctl

Awesome Aws
A curated list of awesome Amazon Web Services (AWS) libraries, open source repos, guides, blogs, and other resources. Featuring the Fiery Meter of AWSome.
Stars: ✭ 9,895 (+10101.03%)
Mutual labels:  ec2, aws-sdk, cloudwatch, rds
sensu-plugins-aws
This plugin provides native AWS instrumentation for monitoring and metrics collection, including: health and metrics for various AWS services, such as EC2, RDS, ELB, and more, as well as handlers for EC2, SES, and SNS.
Stars: ✭ 79 (-18.56%)
Mutual labels:  ec2, cloudwatch, ebs, rds
aws-tag-sched-ops
Retired, please see https://github.com/sqlxpert/lights-off-aws
Stars: ✭ 24 (-75.26%)
Mutual labels:  ec2, ebs, rds
Aws Cost Saver
A tiny CLI tool to help save costs in development environments when you're asleep and don't need them!
Stars: ✭ 178 (+83.51%)
Mutual labels:  ec2, rds
Check Reserved Instances
Compare instance reservations and running instances for AWS services
Stars: ✭ 102 (+5.15%)
Mutual labels:  ec2, rds
Deploy Strapi On Aws
Deploying a Strapi API on AWS (EC2 & RDS & S3)
Stars: ✭ 121 (+24.74%)
Mutual labels:  ec2, rds
Ec2instances.info
Amazon EC2 instance comparison site
Stars: ✭ 3,619 (+3630.93%)
Mutual labels:  ec2, rds
amazon-cloudwatch-auto-alarms
Automatically create and configure Amazon CloudWatch alarms for EC2 instances, RDS, and AWS Lambda using tags for standard and custom CloudWatch Metrics.
Stars: ✭ 52 (-46.39%)
Mutual labels:  ec2, cloudwatch
Komiser
☁️ Cloud Environment Inspector 👮🔒 💰
Stars: ✭ 2,684 (+2667.01%)
Mutual labels:  ec2, rds
ebsautotagger
AWS Lambda function to tag EBS volumes created by autoscaling
Stars: ✭ 18 (-81.44%)
Mutual labels:  ec2, ebs
aws-backup-lambda
A utility AWS lambda function to manage EBS and RDS snapshot backups.
Stars: ✭ 60 (-38.14%)
Mutual labels:  ebs, rds
Awstaghelper
AWS bulk tagging tool
Stars: ✭ 98 (+1.03%)
Mutual labels:  ec2, rds
Aws Cli Cheatsheet
☁️ AWS CLI + JQ = Make life easier
Stars: ✭ 94 (-3.09%)
Mutual labels:  ec2, rds
Aws Sdk Perl
A community AWS SDK for Perl Programmers
Stars: ✭ 153 (+57.73%)
Mutual labels:  ec2, aws-sdk
go-localstack
Go Wrapper for using localstack
Stars: ✭ 56 (-42.27%)
Mutual labels:  ec2, cloudwatch
Hello-AWS-Data-Services
Sample code for AWS data service and ML courses on LinkedIn Learning
Stars: ✭ 144 (+48.45%)
Mutual labels:  aws-sdk, rds
terraform-aws-backup
Terraform module to create AWS Backup plans. AWS Backup is a fully managed backup service that makes it easy to centralize and automate the back up of data across AWS services (EBS volumes, RDS databases, DynamoDB tables, EFS file systems, and Storage Gateway volumes).
Stars: ✭ 72 (-25.77%)
Mutual labels:  ebs, rds
aws-map
Make a network graph of an AWS region
Stars: ✭ 79 (-18.56%)
Mutual labels:  ec2, rds
terraform-aws-backup
Terraform module to provision AWS Backup, a fully managed backup service that makes it easy to centralize and automate the back up of data across AWS services such as EBS volumes, RDS databases, DynamoDB tables, EFS file systems, and AWS Storage Gateway volumes.
Stars: ✭ 62 (-36.08%)
Mutual labels:  ebs, rds
instance-watcher
Get notified for Instances mistakenly left running across all AWS regions for specific AWS Account
Stars: ✭ 90 (-7.22%)
Mutual labels:  ec2, rds

awsctl

This is a small maintanence tool for managing aws infrastructure easily with a single binary on a region or all regions at a single command

Tool is built using cobra, for getting started just run awsctl and see the example commands available.

To use the tool with dry run just run the command, the really execute add --yes

Optional output as json using -o json

WIP: Optionl slack message using --slack and setting environment variable AWSCTL_SLACK_URL

build

# Use go modules add the following env var GO111MODULE=on
go build -ldflags "-s -w"

Example commands

Get all EC2 events from all regions

awsctl get ec2 events -r all

List regions

awsctl list regions

List availablity zones in a region

awsctl list azs --region us-east-1

Delete all unused EBS in all regions

awsctl delete ebs --region all --yes

Set cloudwatch logs with no expirey to 14 days expiry

awsctl set cloudwatch --region all --retention 14 --yes

Manage RDS insatnces or clusters

awsctl get rds --region all  --type instance #or cluster
awsctl get rdssnapshots --region all  --type instance --name db01
awsctl delete rdssnapshots --name db01 --type instance --region all --older 14 --yes

ECR Opertaion for setting lifecycle policy to untagged repositories

awsctl set ecrregistrypolicy -r eu-west-2 --retention 7

ECR Repository configuration to scanOnPush repository for vulnerabilities

awsctl set ecrscanonpush --region eu-west-1 --scan true  --yes
awsctl set ecrscanonpush --region all --scan true  --yes

ACM Certificates

awsctl get certificates --region ue-east-1    # Get all expiring and expired certificates in region or all regions, for all expiring certificates it analyses why aren't the certificates being renewed automatically
awsctl delete certificates --region all --yes # Delete all unused certificates from the account

Cloudwatch Alarms

Currently tested on Errors metric for lambda

# Single lambda
awsctl set cloudwatchalarm --resource lambda --metric errors --region eu-west-2 --arn arn:aws:lambda:eu-west-2:000000000000:function:test --threshold 3 --action arn:aws:sns:eu-west-2:000000000000:SNSToSlack --yes

# All lambdas
awsctl set cloudwatchalarm --resource lambda --metric errors --region eu-west-2 --threshold 3 --action arn:aws:sns:eu-west-2:000000000000:SNSToSlack --yes

# All lambdas in all regions
awsctl set cloudwatchalarm --resource lambda --metric errors --region all --threshold 3 --action arn:aws:sns:eu-west-2:000000000000:SNSToSlack --yes

Delete network interfaces

awsctl delete ni --region eu-west-2 --filter available --yes

Delete old ECR images in a region or in all regions

awsctl delete ecr -r eu-west-2 --keep 20 --yes # This will keep 20 newest images for all repositories in the region

Get simple reservation status on all of your regions

awsctl get ri -r all

For any missing action please open an issue for a feature request.

Contributing

Fork, implement, add tests, pull request, get my everlasting thanks and a respectable place here :).

Copyright

Copyright (c) 2019 Omer Haim, @omerhaim. See LICENSE for further details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].