Skip to content

Syntax error in module 'lambda_function': name 'outputBucket' is used prior to global declaration (lambda_function.py, line 28) #5

@poojaalagar

Description

@poojaalagar

outputBucket = "attachment-desti-test" events bucket
outputPrefix = "csv/"

def lambda_handler(event, context):
bucket = event['Records'][0]['s3']['bucket']['name']
key = urllib.unquote_plus(event['Records'][0]['s3']['object']['key']).decode('utf8')

try:
    # Set outputBucket if required
    if not outputBucket:
        global outputBucket
        outputBucket = bucket

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions