Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@xavier-thomas
xavier-thomas / cloudwatch-rule.yaml
Created June 9, 2022 10:17
Pipeline Monitor Event Rule - CloudFormation
Description: The CloudWatch event rule to publish statuses to the SNS topic
Parameters:
ServiceCodeTag:
Description: The code attached to the service which costs are attributed to
Type: String
ServiceNameTag:
Description: The name of the service which costs are attributed to
@xavier-thomas
xavier-thomas / del-cwlogs.sh
Last active August 25, 2021 14:44
AWS delete all CloudWatch Log Groups
# This command will lets you find and delete all Cloudwatch log groups in an AWS Account.
# You need to have assumed the permissions to run the command before the following can be run.
# Alternatively, pass in the --profile <aws-profile-name> in the AWS commands to obtain permission.
aws logs describe-log-groups --query logGroups[].logGroupName |\
while read logGroup
do
TEMP=$(sed -e 's/,$//' -e 's/^"//' -e 's/"$//' <<<"${logGroup}")
aws logs delete-log-group --log-group-name $TEMP
done
### Keybase proof
I hereby claim:
* I am xavier-thomas on github.
* I am xavier211 (https://keybase.io/xavier211) on keybase.
* I have a public key ASAk8JH2mjKsb2mJ2Hfsf9JdWhNG_fUu5zytQFMqcCPtoAo
To claim this, I am signing this object: