https://pulumi.com logo
Title
c

chilly-magazine-6129

05/13/2021, 7:27 PM
I'm trying to figure out how to reduce the default cloudwatch retention window for the Lambdas created through Pulumi. What's the right pattern / doc to follow? Thanks!
m

millions-furniture-75402

05/13/2021, 7:29 PM
lambdaFunctionApi.name.apply(
  lambdaFunctionName =>
    new aws.cloudwatch.LogGroup(`${appName}-function-api-lg`, {
      name: `/aws/lambda/${lambdaFunctionName}`,
      retentionInDays: 14,
    }),
);
l

little-cartoon-10569

05/13/2021, 7:44 PM
It looks like that could be rewritten thus:
new aws.cloudwatch.LogGroup(`${appName}-function-api-lg`, {
  name: pulumi.interpolate`/aws/lambda/${lambdaFunctionApi.name}`,
  retentionInDays: 14,
});
c

chilly-magazine-6129

05/13/2021, 9:19 PM
❤️ thanks! will try it out