Skip to content

Commit 130c077

Browse files
committed
Updated README.md
1 parent 13b0271 commit 130c077

File tree

3 files changed

+15
-16
lines changed

3 files changed

+15
-16
lines changed

awslambdas3move/README.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ It handles an AWS Lambda function that moves an object when it appears in a S3 b
2525

2626
* Create a S3 bucket for the source and another S3 bucket for the target.
2727

28-
* Create an IAM Policy: ex. `Policy-VM-buckets`
28+
* Create an IAM Policy: ex. `Policy-my-buckets`
2929

3030
Content of the IAM policy:
3131

@@ -40,7 +40,7 @@ It handles an AWS Lambda function that moves an object when it appears in a S3 b
4040
"s3:DeleteObject"
4141
],
4242
"Resource": [
43-
"arn:aws:s3:::sourcevm/*"
43+
"arn:aws:s3:::sourcebucket/*"
4444
]
4545
},
4646
{
@@ -49,11 +49,10 @@ It handles an AWS Lambda function that moves an object when it appears in a S3 b
4949
"s3:PutObject"
5050
],
5151
"Resource": [
52-
"arn:aws:s3:::targetvm/*"
52+
"arn:aws:s3:::targetbucket/*"
5353
]
5454
},
5555
{
56-
"Sid": "Stmt1430872844000",
5756
"Effect": "Allow",
5857
"Action": [
5958
"cloudwatch:*"
@@ -63,7 +62,6 @@ It handles an AWS Lambda function that moves an object when it appears in a S3 b
6362
]
6463
},
6564
{
66-
"Sid": "Stmt1430872852000",
6765
"Effect": "Allow",
6866
"Action": [
6967
"logs:*"
@@ -76,15 +74,15 @@ It handles an AWS Lambda function that moves an object when it appears in a S3 b
7674
}
7775
```
7876

79-
* Create a role: `Role-VM-buckets`.
77+
* Create a role: `Role-my-buckets`.
8078

81-
This role uses the policy `Policy-VM-buckets`
79+
This role uses the policy `Policy-my-buckets`
8280

8381
* Create an AWS lambda function:
8482
* Name: `<LAMBDA_NAME>`
8583
* Runtime: `Java 8`
86-
* Handler: `example.S3Move::handleRequest`
87-
* Role: `Role-VM-buckets`
84+
* Handler: `example.S3MoveHandler::handleRequest`
85+
* Role: `Role-my-buckets`
8886
* The triggers:
8987
* `S3`
9088
* Bucket: `<SOURCE_BUCKET_NAME>`
@@ -94,10 +92,10 @@ It handles an AWS Lambda function that moves an object when it appears in a S3 b
9492
* `Amazon CloudWatch`
9593
* `Amazon CloudWatch Logs`
9694
* `Amazon S3`
97-
* Lambda obtained information from the policy statements: `Managed policy Policy-VM-buckets`:
98-
* `s3:GetObject` --> `Allow: arn:aws:s3:::sourcevm/*`
99-
* `s3:DeleteObject` --> `Allow: arn:aws:s3:::sourcevm/*`
100-
* `s3:PutObject` --> `Allow: arn:aws:s3:::targetvm/*`
95+
* Lambda obtained information from the policy statements: `Managed policy Policy-my-buckets`:
96+
* `s3:GetObject` --> `Allow: arn:aws:s3:::sourcebucket/*`
97+
* `s3:DeleteObject` --> `Allow: arn:aws:s3:::sourcebucket/*`
98+
* `s3:PutObject` --> `Allow: arn:aws:s3:::targetbucket/*`
10199
* Basic Settings for the lambda function:
102100
* Memory (MB): `1024`
103101
* Timeout: `10 sec`

awslambdas3move/src/main/java/example/S3Move.java renamed to awslambdas3move/src/main/java/example/S3MoveHandler.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
import com.amazonaws.services.lambda.runtime.LambdaLogger;
2020

2121

22+
23+
24+
25+
2226
public class S3Move implements RequestHandler<S3Event, String> {
2327

2428
private static final String DESTINATION_BUCKET = "targetvm"; // Destination bucket name

awslambdas3move/src/main/resources/META-INF/MANIFEST.MF

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)