Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as cloudfront from "aws-cdk-lib/aws-cloudfront";
import * as iam from "aws-cdk-lib/aws-iam";
import { Provider } from "aws-cdk-lib/custom-resources";
import { Construct } from "constructs";
import { DITNodejsFunction } from "../common";
import { DITNodejsFunction, LOG_RETENTION_DAYS } from "../common";
import { addCfnGuardSuppressRules } from "../../../../utils/utils";

export interface CSPUpdaterConstructProps {
Expand Down Expand Up @@ -83,6 +83,7 @@ export class CSPUpdaterConstruct extends Construct {

const provider = new Provider(this, "CSPUpdaterProvider", {
onEventHandler: cspUpdaterFunction,
logRetention: LOG_RETENTION_DAYS,
});

new CustomResource(this, "CSPUpdaterCustomResource", {
Expand Down
2 changes: 2 additions & 0 deletions source/constructs/lib/v8/stacks/management-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { AuthConstruct, WebDistributionConstruct } from "../constructs/frontend"
import { CSPUpdaterConstruct } from "../constructs/frontend/csp-updater-construct";
import { MetricsConstruct } from "../constructs/metrics";
import { ImageProcessingStack } from "./image-processing-stack";
import { LOG_RETENTION_DAYS } from "../constructs/common";

export interface ManagementStackProps extends StackProps {
solutionId: string;
Expand Down Expand Up @@ -98,6 +99,7 @@ export class ManagementStack extends Stack {
],
destinationBucket: webConstruct.bucket,
prune: true,
logRetention: LOG_RETENTION_DAYS,
});


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,29 @@ Temporary Password: <strong>{####}</strong>
},
"Type": "AWS::Lambda::Function",
},
"CSPUpdaterCSPUpdaterProviderframeworkonEventLogRetention609BA59B": {
"Properties": {
"LogGroupName": {
"Fn::Join": [
"",
[
"/aws/lambda/",
{
"Ref": "CSPUpdaterCSPUpdaterProviderframeworkonEventE7D5E323",
},
],
],
},
"RetentionInDays": 3653,
"ServiceToken": {
"Fn::GetAtt": [
"LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A",
"Arn",
],
},
},
"Type": "Custom::LogRetention",
},
"CSPUpdaterCSPUpdaterProviderframeworkonEventServiceRole9DF2EE66": {
"Properties": {
"AssumeRolePolicyDocument": {
Expand Down Expand Up @@ -915,6 +938,29 @@ Temporary Password: <strong>{####}</strong>
},
"Type": "AWS::Lambda::Function",
},
"CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CLogRetention1948627D": {
"Properties": {
"LogGroupName": {
"Fn::Join": [
"",
[
"/aws/lambda/",
{
"Ref": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C81C01536",
},
],
],
},
"RetentionInDays": 3653,
"ServiceToken": {
"Fn::GetAtt": [
"LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8aFD4BFC8A",
"Arn",
],
},
},
"Type": "Custom::LogRetention",
},
"CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265": {
"Properties": {
"AssumeRolePolicyDocument": {
Expand Down