INNER CODE UNIT · Python

lambda_handler

aws-samples/serverless-test-samples · python-test-samples/apigw-lambda/src/app.py:19

def lambda_handler(event: APIGatewayProxyEvent, context: LambdaContext) -> dict:

    s3_client = boto3.client('s3')
    s3_response = s3_client.list_buckets()

    bucket_list = "|".join([x["Name"] for x in s3_response["Buckets"]])
    
    print("Hello logfile!")

    return {
        "statusCode": 200,
        "body": bucket_list
    }



View source record →

📰 Research Paper
Loading…
⏳ Fetching content…