Despite using correct permissions, and trying to both print, and to log to cloudwatch, I am unable to see any output.
Here is my lambda handler:
version 1
def handler(event, context):
print('here 1')
for request in event['Records']:
# do something
print('here 4')
return "Success"
version 2
import logging
logging.basicConfig(level = logging.INFO)
logger = logging.getLogger()
def handler(event, context):
logger.info('here 1')
for request in event['Records']:
# do something
logger.info('here 4')
return "Success"
My code times out, and doesn't print anything to cloudwatch logs. What's the issue?
edit: IAM Permission Policies
AWSLambdaVPCAccessExecutionRole
AWSLambdaFullAccess
AWSLambdaVPCAccessExecutionRole has full cloudwatch createLogGroup, createLogStream, and PutLogEvents access.