awslimitchecker

所属分类:企业管理
开发工具:GO
文件大小:0KB
下载次数:0
上传日期:2022-10-02 16:50:29
上 传 者sh-1993
说明:  简单的模块,以编程方式检索您的AWS帐户限制(无论它们是否受服务配额支持...
(Simple module to programatically retrieve your AWS account limits (whether they are supported by servicequotas or not). It also provide a lightweight cli program to access the data.)

文件列表:
LICENSE (1076, 2022-10-02)
awslimitchecker.go (1728, 2022-10-02)
awslimitchecker_test.go (6719, 2022-10-02)
cmd/ (0, 2022-10-02)
cmd/awslimitchecker/ (0, 2022-10-02)
cmd/awslimitchecker/check.go (3050, 2022-10-02)
cmd/awslimitchecker/iam.go (552, 2022-10-02)
cmd/awslimitchecker/main.go (3479, 2022-10-02)
codecov.yaml (212, 2022-10-02)
go.mod (1466, 2022-10-02)
go.sum (49947, 2022-10-02)
internal/ (0, 2022-10-02)
internal/services/ (0, 2022-10-02)
internal/services/acm.go (1175, 2022-10-02)
internal/services/acm_test.go (2140, 2022-10-02)
internal/services/autoscaling.go (1959, 2022-10-02)
internal/services/autoscaling_test.go (3087, 2022-10-02)
internal/services/awsHelper.go (2830, 2022-10-02)
internal/services/awsServiceInterface.go (1441, 2022-10-02)
internal/services/cloudformation.go (2233, 2022-10-02)
internal/services/cloudformation_test.go (2256, 2022-10-02)
internal/services/dynamodb.go (1158, 2022-10-02)
internal/services/dynamodb_test.go (2036, 2022-10-02)
internal/services/ebs.go (6426, 2022-10-02)
internal/services/ebs_test.go (17472, 2022-10-02)
internal/services/ec2.go (328, 2022-10-02)
internal/services/ec2_test.go (742, 2022-10-02)
internal/services/eks.go (2483, 2022-10-02)
internal/services/eks_test.go (4804, 2022-10-02)
internal/services/elasticache.go (1274, 2022-10-02)
... ...

# awslimitchecker [![codecov](https://codecov.io/gh/sebasrp/awslimitchecker/branch/main/graph/badge.svg?token=Y5AOHU08FU)](https://codecov.io/gh/sebasrp/awslimitchecker) [![license](https://img.shields.io/github/license/sebasrp/awslimitchecker)](https://tldrlegal.com/license/mit-license) [![CI](https://github.com/sebasrp/awslimitchecker/actions/workflows/workflow.yml/badge.svg)](https://github.com/sebasrp/awslimitchecker/actions/workflows/workflow.yml) [![go Report Card](https://goreportcard.com/badge/github.com/sebasrp/awslimitchecker)](https://goreportcard.com/report/github.com/sebasrp/awslimitchecker) Simple module to programatically retrieve your AWS account limits (whether they are supporter by servicequotas or not). It also provide a lightweight cli program to access the data. ## Status The project is under active development. We are focusing primarly to put the basic foundations of the module/cli in order to make it useful. Not many services are currently supported, but it's fairly simple to add them - priority at the moment is to put the foundations - adding services is done gradually. ## Features * Check current AWS resource usage against AWS ServiceQuota limits (see [wiki - Supported Quotas](https://github.com/sebasrp/awslimitchecker/wiki/Supported-Quotas) for complete list) * Retrieves current usage * Compare current usage to limits * When available, retrieves applied (different than default) values * Supports explicitely setting the AWS region * Supports Overriding default/applied limits (for accounts that have increased limits through customer support for example) ## cli A utility `awslimitchecker` CLI is provided, that exposes the module through a simple interface. ### Usage Make sure you are logged into your AWS account (`aws configure` or through environment variables). This account needs to have the required IAM permissions. Check the help page with `awslimitchecker --help` to see all available commands. ### List required permissions `awslimitchecker` requires a set of permissions in order to retrieve usage and quota information. To list the required AWS IAM policies, use the `iam` command line argument ```shell awslimitchecker iam Required IAM permissions to retrieve usage/limits: * dynamodb:ListTables * eks:ListClusters * eks:ListNodegroups * elasticache:DescribeCacheClusters * elasticloadbalancing:DescribeLoadBalancers * elasticloadbalancing:DescribeAccountLimits * iam:GetAccountSummary * kinesis:DescribeLimits * rds:DescribeAccountAttributes * s3:ListAllMyBuckets * sns:ListTopics * sns:ListSubscriptions ``` ### Run a check on a single service (note - all "usage" have been manufactured/are examples) ```shell awslimitchecker check rds --console AWS profile: default | AWS region: ap-southeast-1 | service: rds * [rds] DB instances 100/600 * [rds] DB clusters 100/300 * [rds] Reserved DB instances 0/600 ``` ### Run all the available checks (note - all "actuals" have been manufactured/are examples) ```shell awslimitchecker check all AWS profile: default | AWS region: ap-southeast-1 | service: all * [rds] DB instances 100/600 * [rds] DB clusters 100/300 * [rds] Reserved DB instances 0/600 * [dynamodb] Maximum number of tables 100/2500 * [eks] Clusters 1/100 * [eks] Managed node groups per cluster (AWS::EKS::Cluster::cluster1) 0/30 * [eks] Managed node groups per cluster (AWS::EKS::Cluster::cluster2) 0/30 * [elasticache] Nodes per Region 10/300 * [s3] Buckets 20/100 * [sns] Topics per Account 300/100000 * [sns] Pending Subscriptions per Account 300/5000 * [elasticloadbalancing] Classic Load Balancers per Region 12/100 * [elasticloadbalancing] Application Load Balancers per Region 12/100 * [elasticloadbalancing] Network Load Balancers per Region 12/50 * [iam] Instance profiles per Account 100/1000 * [iam] Policies per Account 1000/3000 * [iam] Server Certificates per Account 10/25 * [iam] Roles per Account 1000/5000 * [iam] Users per Account 100/5000 * [iam] Groups per Account 100/300 * [kinesis] On-demand Data Streams per account 10/50 * [kinesis] Shards per Region 10/200 ``` ### Override Limits `awslimitchecker` allows you to override the applied or default quotas. To do so, you can specify the path to the json file in the CLI, or provide the slice in the module as well. The format of the json file needs to be as follows: ```json { "kinesis": { "Shards per Region": 123, "On-demand Data Streams per account": 456 }, ... "serviceName": { "quota name": 1234.00 // override value } } ``` Then, you can use the cli as follow: ```shell awslimitchecker check all --quota-override-json ``` ### Export data to csv ```shell awslimitchecker check all --csv ``` ### Configuration file Tired of manually selecting the different parameters? You can save those in a file and provide it with the `--config flag` - or just place it under `$HOME/.awslimitchecker` to be automatically picked up. The format and options supported are (order does not matter) ```yaml awsprofile: region: overridesJson: console: true /false csv: true / false verbose: true / false ``` ## Development To run the latest: ```shell cd awslimitchecker go build ./... && go install ./... awslimitchecker --help ``` When making changes: 1. make sure you add relevant tests (there is a github action doing codecov validation) 2. make sure the existing tests pass `go test ./...` from root directory 3. make sure the changes passes [golangci-lint](https://golangci-lint.run/) `golangci-lint run` from root directory

近期下载者

相关文件


收藏者