In order to create an encryption for CloudWatch all log groups using the CLI command , individual log group names are required. Is there a way to encrypt all log groups in CloudWatch at a time using a single command? or is there a way to do it using CDK?
I followed the following AWS document:
https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/encrypt-log-data-kms.html
For associating KMS key each time asking me to give individual group name.
aws logs associate-kms-key --log-group-name my-log-group --kms-key-id "key-arn"