Heyo, on destroying a stack that had Lambda functi...
# aws
Heyo, on destroying a stack that had Lambda functions created as described in the Crosswalk for AWS section, how can I make it so the implicitly generated Cloudwatch log groups for these Lambdas are destroyed as well?
someone else may know something i don't here, but since those log groups aren't created until the function executes i don't believe Pulumi would have any way of knowing they exist or what they're named
Ah, hm, so it's entirely an AWS thing
Thanks for the answer!
sure thing
You have to create the log group after the Lambda function and explicitly set a dependency. In Python:
Copy code
my_lambda_log_group = aws.cloudwatch.LogGroup(
        lambda name: f'/aws/lambda/{name}'
This way it's also possible to set e.g. retention which would otherwise be 1 month by default.
🙌 1
The only downside is that you can't come with your own name for the log group, it has to follow the standard naming (i.e.