Skip to content

Commit 466518f

Browse files
committed
Refactoring
1 parent 3340d62 commit 466518f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

awslambdas3copy/src/main/java/example/S3CopyHandler.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public class S3CopyHandler implements RequestHandler<S3Event, String> {
2222
private static final String DESTINATION_BUCKET = "targetbucket10"; // Destination bucket name
2323

2424
@Override
25-
public String handleRequest(S3Event input, Context context) {
25+
public String handleRequest(S3Event s3Event, Context context) {
2626
String sourceBucketName; // Source bucket name
2727
String sourceKeyName; // Source key name
2828
String destinationBucketName; // Destination bucket name
@@ -31,7 +31,7 @@ public String handleRequest(S3Event input, Context context) {
3131
LambdaLogger logger = context.getLogger();
3232

3333
// Get Event Record
34-
S3EventNotificationRecord record = input.getRecords().get(0);
34+
S3EventNotificationRecord record = s3Event.getRecords().get(0);
3535

3636
// Source Bucket Name
3737
sourceBucketName = record.getS3().getBucket().getName();
@@ -45,7 +45,7 @@ public String handleRequest(S3Event input, Context context) {
4545
// Destination File Name
4646
destinationKeyName = sourceKeyName;
4747

48-
logger.log("Input: " + input);
48+
logger.log("S3Event: " + s3Event);
4949
logger.log("Source Bucket: " + sourceBucketName + "\n");
5050
logger.log("Source Object: " + sourceKeyName + "\n");
5151
logger.log("Target Bucket: " + destinationBucketName + "\n");

0 commit comments

Comments
 (0)