Skip to content

Commit

Permalink
fix(logging): fix logging infra stack (#3788)
Browse files Browse the repository at this point in the history
fix(logging): fix logging infra stack duplicate imports and set s3bucket autoDeleteObject to true
  • Loading branch information
NikaHsn authored Sep 22, 2023
1 parent 79725fb commit bf2e77e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
21 changes: 11 additions & 10 deletions infra/lib/logging/stack.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

import { Construct } from "constructs";
import { IntegrationTestStackEnvironment, IntegrationTestStackEnvironmentProps, AmplifyCategory, IntegrationTestStack, randomBucketName } from "../common";
import * as cdk from "aws-cdk-lib"
import * as logs from "aws-cdk-lib/aws-logs"
import * as path from "path"
import * as iam from "aws-cdk-lib/aws-iam"
import * as cognito_identity from "@aws-cdk/aws-cognito-identitypool-alpha";
import * as cdk from "aws-cdk-lib";
import * as iam from "aws-cdk-lib/aws-iam";
import * as logs from "aws-cdk-lib/aws-logs";
import { BucketDeployment, Source } from "aws-cdk-lib/aws-s3-deployment";
import { Construct } from "constructs";
import * as path from "path";
import { AmplifyCategory, IntegrationTestStack, IntegrationTestStackEnvironment, IntegrationTestStackEnvironmentProps, randomBucketName } from "../common";

import * as s3 from "aws-cdk-lib/aws-s3"
import * as lambda from "aws-cdk-lib/aws-lambda"
import * as lambda_node from "aws-cdk-lib/aws-lambda-nodejs"
import * as api_gateway from "aws-cdk-lib/aws-apigateway"
import * as api_gateway from "aws-cdk-lib/aws-apigateway";
import * as lambda from "aws-cdk-lib/aws-lambda";
import * as lambda_node from "aws-cdk-lib/aws-lambda-nodejs";
import * as s3 from "aws-cdk-lib/aws-s3";

export class LoggingIntegrationTestStack extends IntegrationTestStack<LoggingIntegrationTestStackEnvironmentProps, LoggingIntegrationTestStackEnvironment> {
constructor(
Expand Down Expand Up @@ -86,6 +86,7 @@ export class LoggingIntegrationTestStackEnvironment extends IntegrationTestStack
publicReadAccess: false,
versioned: true,
removalPolicy: cdk.RemovalPolicy.DESTROY,
autoDeleteObjects: true,
enforceSSL: true,
blockPublicAccess: s3.BlockPublicAccess.BLOCK_ALL,
});
Expand Down
4 changes: 1 addition & 3 deletions infra/lib/stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@ import { AnalyticsIntegrationTestStack } from "./analytics/stack";
import {
AuthIntegrationTestStack,
AuthIntegrationTestStackEnvironmentProps,
AuthIntegrationTestStackEnvironmentProps,
} from "./auth/stack";
import { IntegrationTestStack } from "./common";
import { LoggingIntegrationTestStack } from "./logging/stack";
import {
StorageAccessLevel,
StorageIntegrationTestStack,
StorageIntegrationTestStack,
} from "./storage/stack";
import { LoggingIntegrationTestStack } from "./logging/stack";

export class AmplifyFlutterIntegStack extends cdk.Stack {
constructor(scope: Construct, id: string, props?: cdk.StackProps) {
Expand Down

0 comments on commit bf2e77e

Please sign in to comment.