1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
1
Hi, the AWS API has everything you need. Write your Lambda using an AWS API SDK (e.g. Boto3 for Python) and call the following actions: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeLogGroups.html https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DeleteLogGroup.html I hope this helps!
Contenus pertinents
- demandé il y a 2 mois
- demandé il y a un an
- demandé il y a 6 mois
- demandé il y a 6 mois
- Quel groupe de journaux est à l'origine de l'augmentation inattendue de ma facture CloudWatch Logs ?AWS OFFICIELA mis à jour il y a 9 mois
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a 2 ans
To add to the above API call using boto3 you also need to have Lambda execution role(IAM role) to include below permissions to delete the log group and log streams
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "logs:deleteLogGroup", "logs:deleteLogStream" ], "Resource": [ "arn:aws:logs:::*" ] } ] }