2022年1月4日

创建elasticache告警

摘要: #!/bin/bashclusterIds=`aws elasticache describe-cache-clusters|jq -r .CacheClusters[].CacheClusterId`for clusterId in $clusterIdsdo CacheSubnetGroupNa 阅读全文

posted @ 2022-01-04 15:17 无聊的时候看一下 阅读(56) 评论(0) 推荐(0) 编辑

2021年12月31日

AWS-cli创建网络(VPC、subnet、route、igw、NAT)

摘要: #!/bin/bash rm -rf subnet.txt natgateway.txt CIDR=10.0.0.0/16 publicsubnets=("subnet-public1,10.0.0.0/24,eu-central-1a" "subnet-public2,10.0.1.0/24,eu 阅读全文

posted @ 2021-12-31 10:40 无聊的时候看一下 阅读(311) 评论(0) 推荐(0) 编辑

获取AWS-EC2实例信息

摘要: #!/bin/bashrm -rf test.csvregion="ap-northeast-1"echo "实例名称,实例ID,私网IP,实例类型,系统,磁盘">>test.csvinstancesids=`aws ec2 describe-instances --region $region|j 阅读全文

posted @ 2021-12-31 10:34 无聊的时候看一下 阅读(209) 评论(0) 推荐(0) 编辑

批量创建EC2cloudwatch告警(mem、cpu、disk)

摘要: #!/bin/bashinstanceids=`aws ec2 describe-instances |jq -r .Reservations[].Instances[].InstanceId`alarm_actions="arn:aws:sns:region:xxxxxxxxxx:Alarm"re 阅读全文

posted @ 2021-12-31 09:35 无聊的时候看一下 阅读(196) 评论(0) 推荐(0) 编辑