-
Notifications
You must be signed in to change notification settings - Fork 10
/
.aliases
202 lines (139 loc) · 11.8 KB
/
.aliases
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
#!/bin/bash
# Set aliases for some generic scripts
REPO_HOME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
alias aws-acm-list-certificates='python3 ${REPO_HOME}/ACM-PCA/list_certificates.py'
alias aws-ami-find-by-amiid='aws ec2 describe-images --image-id '
alias aws-ami-latest='python3 ${REPO_HOME}/AMI/get_latest_amis.py'
alias aws-apigws='python3 ${REPO_HOME}/APIGateway/list_api_gateways.py'
alias aws-apigw-deploy='python3 ${REPO_HOME}/APIGateway/deploy_apigw.py'
alias aws-apigw-v2-deploy='python3 ${REPO_HOME}/APIGateway/deploy_apigw_v2.py'
alias aws-apis-test='python3 ${REPO_HOME}/API/check_aws_apis.py'
alias aws-athena-query-execution='python3 ${REPO_HOME}/Athena/athena_query_execution.py'
alias aws-canonical-user-id='aws s3api list-buckets --query Owner.ID --output text'
alias aws-cloudformation-to-dot-to-image='python3 ${REPO_HOME}/CloudFormation/cfn_to_dot_to_image.py'
alias aws-cloudformation-list-stacks='python3 ${REPO_HOME}/CloudFormation/list_stacks.py'
alias aws-cloudformation-validate-template='aws cloudformation validate-template --template-body'
alias aws-cloudtrail-lookup-events='python3 ${REPO_HOME}/CloudTrail/cloudtrail_lookup_events.py'
alias aws-cloudtrail-list-security-event-names='python3 ${REPO_HOME}/CloudTrail/list_cloudtrail_security_event_names.py'
alias aws-cloudtrail-ref-event-names='browser https://gist.github.com/pkazi/8b5a1374771f6efa5d55b92d8835718c'
alias aws-cloudwatch-insights='python3 ${REPO_HOME}/CloudWatch/CloudWatch-LogsInsights/cloudwatch_logs_insights.py'
alias aws-cloudwatch-log-send-sample-event='python3 ${REPO_HOME}/CloudWatch/send_cloudwatch_log_event.py'
alias aws-cloudwatch-put-cloudwatch-dashboard='python3 ${REPO_HOME}/CloudWatch/put_cloudwatch_dashboard.py'
alias aws-cognito-token='python3 ${REPO_HOME}/Cognito/cognito_token.py'
alias aws-cognito-users='python3 ${REPO_HOME}/Cognito/cognito_users.py'
alias aws-config-list-all-resource-types='. ${REPO_HOME}/Config/list_all_aws_config_resource_types.sh'
alias aws-config-query='python3 ${REPO_HOME}/Config/query_configservice.py'
alias aws-config-query-aggregate='python3 ${REPO_HOME}/Config/query_configservice_aggregate.py'
alias aws-database-status-check='python3 ${REPO_HOME}/_Others/list_databases_status.py'
alias aws-ddb-delete-table-item='python3 ${REPO_HOME}/DynamoDB/delete_table_items.py'
alias aws-ddb-enable-contributor-insights='aws dynamodb update-contributor-insights --contributor-insights-action ENABLE --table-name '
alias aws-ddb-search='python3 ${REPO_HOME}/DynamoDB/search_dynamodb.py'
alias aws-ddb-start-local='. ${REPO_HOME}/DynamoDB/start_dynamodb_local.sh'
alias aws-ec2-instances='python3 ${REPO_HOME}/EC2/list_ec2_instances.py'
alias aws-ec2-check-userdata='python3 ${REPO_HOME}/EC2/UserData/check_UserData.py'
alias aws-ec2-create-key-pair='. ${REPO_HOME}/EC2/create_key_pair.sh'
alias aws-ec2-db-instances-based-on-ports='python3 ${REPO_HOME}/RDS/list_ec2_db_instances_based_on_ports.py'
alias aws-ec2-unreachable='python3 ${REPO_HOME}/EC2/list_ec2_unreachable.py'
alias aws-ec2-security-groups='python3 ${REPO_HOME}/VPC/list_security_groups.py'
alias aws-ecs-list-task-definitions-inactive='aws ecs list-task-definitions --status INACTIVE --no-cli-pager'
alias aws-ecr-list-used-images-having-critical-or-high-severity-findings='python3 ${REPO_HOME}/ECR/list_used_images_having_critical_or_high_severity_findings.py'
alias aws-ecr-get-login='aws ecr get-login --no-include-email'
alias aws-ecs-account-setting-fargateVCPULimit='aws ecs list-account-settings --effective-settings --name fargateVCPULimit'
alias aws-fault-tolerance-analyser='python3 ${REPO_HOME}/../fault-tolerance-analyser/src/account_analyser.py'
alias aws-health-affected-entities-for-organization='python3 ${REPO_HOME}/Health/health_org_helper.py'
alias aws-guardduty-findings='python3 ${REPO_HOME}/GuardDuty/list_findings.py'
alias aws-iam-account-authorization-details='python3 ${REPO_HOME}/IAM/account_authorization_details.py'
alias aws-iam-account-id-from-access-key-id='python3 ${REPO_HOME}/IAM/account_id_from_access_key.py'
alias aws-iam-list-aws-managed-policies-to-files='python3 ${REPO_HOME}/IAM/list_aws_managaed_policies_to_files.sh'
alias aws-iam-list-users='python3 ${REPO_HOME}/IAM/list_iam_users.py'
alias aws-iam-lookup-identities='python3 ${REPO_HOME}/Security/lookup_iam_identities.py'
alias aws-iam-ref-unique-identifiers='browser https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-unique-ids'
alias aws-inspector-cvelist-ap-southeast-2='curl https://s3.ap-southeast-2.amazonaws.com/rules-engine.ap-southeast-2/CVEList.txt'
alias aws-inspector-list-results='python3 ${REPO_HOME}/Inspector/inspector_helper.py'
alias aws-ip-lookup='python3 ${REPO_HOME}/VPC/find_subnet_for_ip.py'
alias aws-ip-ranges='curl https://ip-ranges.amazonaws.com/ip-ranges.json'
alias aws-ip-ranges-link='echo https://ip-ranges.amazonaws.com/ip-ranges.json'
alias aws-lambda-add-permission-for-apigw='python3 ${REPO_HOME}/APIGateway/lambda_permissions_for_apigw.py'
alias aws-lambda-deploy='python3 ${REPO_HOME}/Lambda/deploy_lambda.py'
alias aws-lambda-functions='python3 ${REPO_HOME}/Lambda/list_lambda_functions.py'
alias aws-lambda-layers='python3 ${REPO_HOME}/Lambda/list_lambda_layers.py'
alias aws-msk-cluster-bootstrap-broker-string='aws kafka get-bootstrap-brokers --query BootstrapBrokerStringTls --cluster-arn '
alias aws-msk-cluster-zookeeper-connect-string='aws kafka describe-cluster --query ClusterInfo.ZookeeperConnectString --cluster-arn '
alias aws-msk-list-nodes='python3 ${REPO_HOME}/MSK/msk_list_nodes.py'
alias aws-organizations-list-accounts='python3 ${REPO_HOME}/Organizations/list_accounts.py'
alias aws-organizations-list-policies='python3 ${REPO_HOME}/Organizations/list_policies.py'
alias aws-public-account-ids='python3 ${REPO_HOME}/AWS-Public/aws-public-account-ids.py'
alias aws-public-ip-address-ranges='python3 ${REPO_HOME}/AWS-Public/aws-public-ip-address-ranges.py'
alias aws-rds-cluster-endpoints='python3 ${REPO_HOME}/RDS/list_rds_cluster_endpoints.py'
alias aws-rds-clusters='python3 ${REPO_HOME}/RDS/list_rds_clusters.py'
alias aws-rds-instances='python3 ${REPO_HOME}/RDS/list_rds_instances.py'
alias aws-rds-describe-db-engine-versions-aurora='aws rds describe-db-engine-versions --engine aurora --query "DBEngineVersions[].EngineVersion"'
alias aws-rds-describe-db-engine-versions-aurora-mysql='aws rds describe-db-engine-versions --engine aurora-mysql --query "DBEngineVersions[].EngineVersion"'
alias aws-rds-describe-db-engine-versions-aurora-postgresql='aws rds describe-db-engine-versions --engine aurora-postgresql --query "DBEngineVersions[].EngineVersion"'
alias aws-resource-list-with-config='python3 ${REPO_HOME}/Config/list_resources_with_configservice.py'
alias aws-resource-list-with-resourcegroupstaggingapi='python3 ${REPO_HOME}/_Others/list_resources_with_resourcegroupstaggingapi.py'
alias aws-r53-hostedzones='python3 ${REPO_HOME}/Route53/list_hosted_zones.py'
alias aws-r53-resolver-endpoints-and-ips='python3 ${REPO_HOME}/Route53/list_resolver_endpoints_and_ips.py'
alias aws-s3-buckets='python3 ${REPO_HOME}/S3/list_s3_buckets.py'
alias aws-s3-size='aws s3 ls --summarize --human-readable --recursive s3://'
alias aws-secretsmanager-get-secret='python3 ${REPO_HOME}/SecretManager/get_secret.py'
alias aws-securityhub-list-standards-controls='python3 ${REPO_HOME}/SecurityHub/list_securityhub_standard_controls.py'
alias aws-sfn-start-local='. ${REPO_HOME}/StepFunctions/start_stepfunctions_local.sh'
alias aws-sfn-start-local-container='. ${REPO_HOME}/StepFunctions/start_stepfunctions_local_docker.sh'
alias aws-shield-attack-event-ips='python3 ${REPO_HOME}/WAF-FirewallManager-Shield/aws_shield_attack_event_ips.py'
alias aws-sts-decode-authorization-message='aws sts decode-authorization-message --encoded-message'
alias aws-sts-get-caller-identity='aws sts get-caller-identity'
alias aws-ssm-describe-sessions-history='aws ssm describe-sessions --state History'
alias aws-ssm-list-documents='aws ssm list-documents'
alias aws-ssm-parameters-list-global-infrastructure='. ${REPO_HOME}/SSM/ssm_parameters_list.sh'
alias aws-ssm-start-session='aws ssm start-session --target'
alias aws-ssm-start-session-rdp='aws ssm start-session --document-name AWS-StartPortForwardingSession --parameters "portNumber"=["3389"],"localPortNumber"=["9999"] --target '
alias aws-subnet-ip-usage='python3 ${REPO_HOME}/VPC/available_ip_address_count.py'
alias aws-tag-list='python3 ${REPO_HOME}/_Others/list_tags.py'
alias aws-trustedadvisor-list-result='python3 ${REPO_HOME}/TrustedAdvisor/trusted_advisor_check_result.py'
alias aws-vpc-flow-logs='python3 ${REPO_HOME}/VPC/vpc_flow_logs.py'
alias aws-vpcs='python3 ${REPO_HOME}/VPC/list_vpcs.py'
alias aws-vpc-endpoints='python3 ${REPO_HOME}/VPC-Endpoint/vpc_endpoints.py'
alias aws-vpc-endpoint-gateway-prefix-list='python3 ${REPO_HOME}/VPC-Endpoint/gateway_vpc_endpoint_prefix_lists.py'
alias aws-vpc-endpoint-services='python3 ${REPO_HOME}/VPC-Endpoint/vpc_endpoint_services.py'
alias aws-vpn-connections='python3 ${REPO_HOME}/VPC/list_vpn_connections.py'
alias aws-workspaces-details='python3 ${REPO_HOME}/Workspaces/list_workspaces_details.py'
alias aws-workspace-restore-rebuild='python3 ${REPO_HOME}/Workspaces/workspace_restore_rebuild.py'
alias aws-xray-sampling-rule='python3 ${REPO_HOME}/X-Ray/xray-sampling/xray_sampling_rule.py*'
alias cdk-bootstrap='cdk bootstrap'
alias cdk-deploy='cdk deploy'
alias cdk-diff='cdk diff'
alias cdk-doctor='cdk doctor'
alias cdk-init-app-python='cdk init app --language python'
alias cdk-ls='cdk ls'
alias cdk-synth='cdk synth'
alias cdk-synth-no-staging='cdk synth --no-staging'
alias eksctl-get-iamidentitymapping='eksctl get iamidentitymapping'
alias eksctl-get-nodegroup-output-json='eksctl get nodegroup --output=json'
alias eksctl-get-nodegroup-output-yaml='eksctl get nodegroup --output=yaml'
alias sam-local-invoke='sam local invoke'
alias sam-local-generate-event='sam local generate-event'
alias sam-local-start-api='sam local start-api'
alias sam-local-start-lambda='sam local start-lambda'
alias update-aws-amplify-cli='npm install -g @aws-amplify/cli'
alias update-aws-cdk='. ${REPO_HOME}/CDK/install-cdk-v2.sh'
alias update-aws-cdk-assume-role-credential-plugin='sudo npm install -g cdk-assume-role-credential-plugin@latest'
alias update-aws-cdk-import='. ${REPO_HOME}/CDK/install-cdk-import.sh'
alias update-aws-cdk8s-cli='. ${REPO_HOME}/CDK/install-cdk8s-cli.sh'
alias update-aws-cfn-guard='. ${REPO_HOME}/CloudFormation/install-cfn-guard.sh'
alias update-aws-cli-v2='. ${REPO_HOME}/AWSCLI/install-awscli-v2.sh'
alias update-aws-cloudfront-hosting-toolkit='npm install -g @aws/cloudfront-hosting-toolkit'
alias update-aws-copilot-cli='. ${REPO_HOME}/copilot-cli/install-copilot-cli.sh'
alias update-aws-ecs-cli='. ${REPO_HOME}/ECS/install_ecs_cli.sh'
alias update-aws-eksctl='. ${REPO_HOME}/EKS/install_eksctl.sh'
alias update-aws-eks-aws-iam-authenticator='. ${REPO_HOME}/EKS/install_eks_aws_iam_authenticator.sh'
alias update-aws-eks-node-viewer='go install github.com/awslabs/eks-node-viewer/cmd/eks-node-viewer@latest'
alias update-aws-eks-kubectl='. ${REPO_HOME}/EKS/install_eks_kubectl.sh'
alias update-aws-fault-tolerance-analyser='. ${REPO_HOME}/_Others/fault-tolerance-analyser/install-fault-tolerance-analyser.sh'
alias update-aws-sam-cli='. ${REPO_HOME}/SAM-and-ServerlessApplicationRepository/install-sam-cli.sh'
alias update-aws-sam-cli-beta-cdk='. ${REPO_HOME}/SAM-and-ServerlessApplicationRepository/install-sam-cli-beta-cdk.sh'
alias update-aws-session-manager-plugin='. ${REPO_HOME}/SSM/install_aws_session_manager_plugin_ubuntu.sh'
alias update-aws-ssh-over-ssm='. ${REPO_HOME}/SSM/install_ssh_over_ssm.sh'
alias update-awscii-cli='sudo npm i -g @mhlabs/awscii-cli@latest'
alias update-git-secrets='. ${REPO_HOME}/_Others/git-secrets/install-git-secrets.sh'
alias update-sam2aws='. ${REPO_HOME}/saml2aws/install-saml2aws.sh'