Skip to content

Tag: amazon-web-services

Get context data from Lambda Authorizer (APi Gateway)

I’m using the Aws Lambda authorizer to secure an Api gateway. The authorizer lambda function is written in python using this blueprint from aws (https://github.com/awslabs/aws-apigateway-lambda-authorizer-blueprints/blob/master/blueprints/python/api-gateway-authorizer-python.py) I added this code in the…

S3 appending random string in file name

I have a s3 folder with a csv file stored on it. I’m trying to download the last modified file. I’m using this script to get the last modified file: This code lists my last modified object, the file name is part-00000-40f267f2-38dc-4bab-811c-4c3052fdb1ba-c000.csv and is inside the file_r folder. A…

AWS Lambda function handler missing

I created the following lambda function and its given me the following error. I am new to Python and I dont think there’s anything missing in the function. can someone please help to make this function work? Thanks Execution result Answer Very simple. Rename handler to lambda_handler, or change your lam…

Indicate a directory on Amazon’s S3

I’m new to AWS services. I’ve always used the code below to calculate NDVI for images that were located in a directory. Now all the necessary images are in an amazon S3 folder. How do I replace the lines below? Answer Amazon S3 is not a filesystem. You will need to use different commands to: List …