0

I am trying to create a simple lambda function that is triggered when a bucket is uploaded with a file. My lambda function have 2 policies as of now - a cloudwatch policy to log and an s3 bucket get object policy listed as below

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:PutLogEvents",
                "logs:DescribeLogStreams"
            ],
            "Resource": [
                "arn:aws:logs:*:*:*"
            ]
        }

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:GetObject"
            ],
            "Resource": "arn:aws:s3:::*"
        }
    ]
}

I am using the default example-bucket test to verify if the lambda function works as per the setup. enter image description here I've changed the basic hello text print to something different. I see that this has no effect and event my print bucket is not working. I've went through this other post on SO lambda cloudwatch and verified the similier steps. I am creating my function after creating my policy. Any inputs as to why my function is not being triggered ?

3
  • Have you clicked deploy? Commented Jan 6, 2021 at 20:34
  • Ok did that my friend and now it works !! Crap, I was racking my head for an hour to know the issue. I thought deploy is more like productionalizing the code. Commented Jan 6, 2021 at 21:29
  • I'm glad it works. Please consider accepting my answer below. Thx Commented Jan 6, 2021 at 23:18

1 Answer 1

0

Based on the comment, the solution is to click deploy :)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.