- Newest
- Most votes
- Most comments
Hello.
Try creating only a log group with "AWS::Logs::LogGroup" before creating other resources.
Also, if there is an existing log group, try deleting it before running CloudFormation.
any chance your code deletes retention policy[1] Typically, a log group's retention is set to never expire if the 'RetentionInDays' property isn't specified. I'm wondering if there might be a syntax error related to this property. As Riku suggested, it might be worthwhile to create a log group separately to test your code [1] https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DeleteRetentionPolicy.html
Found that it is because of the naming. When we create the Image Builder related resources, we are using Target Image Name which has a dot. But the names of Image Builder Resources cannot have dots. Hence we are replacing it with underscore. But in the log group name, there is no such restriction, so I left it as is. But because of this, it is creating 2 log groups one with underscore naming and the other with dot. One of them has log retention set to Never Expire. Once I fixed the log group to make it's name consistent with that of the other Image Builder resources, it seems to be working fine.
Relevant content
- asked 8 months ago
- asked 3 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated a month ago
Thank you for the response. The order in the CloudFormation template matters? If yes, then I will check this. Also, there is no existing log group, as I am provisioning everything using CloudFormation.
There may be an issue with the order of resource creation, so try creating the log group first.