Skip to content

Commit 2d08bd9

Browse files
author
Arun Thangavel
committed
Removed Commented Code and Updated the NagSuppression Reason
1 parent 650ca52 commit 2d08bd9

File tree

6 files changed

+4
-83
lines changed

6 files changed

+4
-83
lines changed

AudioTranscribeFunction/dependency-reduced-pom.xml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<!--
3-
~ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4-
~ SPDX-License-Identifier: MIT-0
5-
-->
6-
72
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
83
<parent>
94
<artifactId>s3-lambda-transcribe-java-cdk</artifactId>
105
<groupId>com.amazonaws</groupId>
116
<version>1.0</version>
127
</parent>
138
<modelVersion>4.0.0</modelVersion>
14-
<groupId>com.arunzlair</groupId>
9+
<groupId>com.amazonaws.lambda</groupId>
1510
<artifactId>AudioTranscribeFunction</artifactId>
1611
<build>
1712
<plugins>

AudioTranscribeFunction/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<version>1.0</version>
1515
</parent>
1616

17-
<groupId>com.arunzlair</groupId>
17+
<groupId>com.amazonaws.lambda</groupId>
1818
<artifactId>AudioTranscribeFunction</artifactId>
1919

2020
<properties>

Infra/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<version>1.0</version>
1515
</parent>
1616

17-
<groupId>com.arunzlair</groupId>
17+
<groupId>com.amazonaws.cdk</groupId>
1818
<artifactId>Infra</artifactId>
1919

2020
<properties>

Infra/src/main/java/com/amazonaws/cdk/S3LambdaTranscribeJavaCdkApp.java

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,6 @@ public static void main(final String[] args) {
1818
.verbose(true)
1919
.build()));
2020
new S3LambdaTranscribeJavaCdkStack(app, "S3LambdaTranscribeJavaCdkStack", StackProps.builder()
21-
// If you don't specify 'env', this stack will be environment-agnostic.
22-
// Account/Region-dependent features and context lookups will not work,
23-
// but a single synthesized template can be deployed anywhere.
24-
25-
// Uncomment the next block to specialize this stack for the AWS Account
26-
// and Region that are implied by the current CLI configuration.
27-
/*
28-
.env(Environment.builder()
29-
.account(System.getenv("CDK_DEFAULT_ACCOUNT"))
30-
.region(System.getenv("CDK_DEFAULT_REGION"))
31-
.build())
32-
*/
33-
34-
// Uncomment the next block if you know exactly what Account and Region you
35-
// want to deploy the stack to.
36-
/*
37-
.env(Environment.builder()
38-
.account("123456789012")
39-
.region("us-east-1")
40-
.build())
41-
*/
42-
43-
// For more information, see https://docs.aws.amazon.com/cdk/latest/guide/environments.html
4421
.build());
4522

4623
app.synth();

Infra/src/main/java/com/amazonaws/cdk/S3LambdaTranscribeJavaCdkStack.java

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222

2323
import java.util.List;
2424
import java.util.Map;
25-
// import software.amazon.awscdk.Duration;
26-
// import software.amazon.awscdk.services.sqs.Queue;
2725

2826
public class S3LambdaTranscribeJavaCdkStack extends Stack {
2927
public S3LambdaTranscribeJavaCdkStack(final Construct scope, final String id) {
@@ -33,15 +31,6 @@ public S3LambdaTranscribeJavaCdkStack(final Construct scope, final String id) {
3331
public S3LambdaTranscribeJavaCdkStack(final Construct scope, final String id, final StackProps props) {
3432
super(scope, id, props);
3533

36-
// CfnParameter sourceBucketName = CfnParameter.Builder.create(this, "SourceBucketName")
37-
// .type("String")
38-
// .description("Name of the source bucket")
39-
// .build();
40-
// CfnParameter destinationBucketName = CfnParameter.Builder.create(this, "DestinationBucketName")
41-
// .type("String")
42-
// .description("Name of the destination bucket")
43-
// .build();
44-
4534
CfnParameter languageCode = CfnParameter.Builder.create(this, "transcribeLanguageCode")
4635
.type("String")
4736
.description("Language code for the transcription")
@@ -176,7 +165,7 @@ public S3LambdaTranscribeJavaCdkStack(final Construct scope, final String id, fi
176165

177166
NagSuppressions.addStackSuppressions(this, List.of(NagPackSuppression.builder()
178167
.id("AwsSolutions-IAM5")
179-
.reason("The IAM entity in this example contain wildcard permissions. In a real world production workload it is recommended adhering to AWS security best practices regarding least-privilege permissions (https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege)")
168+
.reason("Lambda needs access to create Log group and put log events which require *. StartTranscriptionJob doesn't support resource-level permissions.")
180169
.build()));
181170

182171
NagSuppressions.addStackSuppressions(this, List.of(NagPackSuppression.builder()

pom.xml

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -16,44 +16,4 @@
1616
<module>Infra</module>
1717
<module>AudioTranscribeFunction</module>
1818
</modules>
19-
<!-- To Create 3rd Party License List -->
20-
<dependencies>
21-
<dependency>
22-
<groupId>org.codehaus.mojo</groupId>
23-
<artifactId>license-maven-plugin</artifactId>
24-
<version>2.1.0</version>
25-
</dependency>
26-
<dependency>
27-
<groupId>com.google.guava</groupId>
28-
<artifactId>guava</artifactId>
29-
<version>32.0.1-jre</version>
30-
</dependency>
31-
<dependency>
32-
<groupId>commons-codec</groupId>
33-
<artifactId>commons-codec</artifactId>
34-
<version>1.13</version>
35-
</dependency>
36-
</dependencies>
37-
<build>
38-
<pluginManagement>
39-
<plugins>
40-
<plugin>
41-
<groupId>org.codehaus.mojo</groupId>
42-
<artifactId>license-maven-plugin</artifactId>
43-
<version>2.1.0</version>
44-
<configuration>
45-
<outputDirectory>.</outputDirectory>
46-
</configuration>
47-
<executions>
48-
<execution>
49-
<id>add-third-party</id>
50-
<goals>
51-
<goal>add-third-party</goal>
52-
</goals>
53-
</execution>
54-
</executions>
55-
</plugin>
56-
</plugins>
57-
</pluginManagement>
58-
</build>
5919
</project>

0 commit comments

Comments
 (0)