Skip to content
Advertisement

Tag: amazon-web-services

How to check the ssm connection status of all the servers with a specific tag value using python boto3

I wanted to check the ssm connection status of all the servers with a specific tag. I am making use of the boto3 module get_connection_status as follows. However get_connection_status functions accepts only strings and not list. Hence I am getting the below error. How can I get rid of this? {“ExecutionLog”:”Parameter validation failed: Invalid type for parameter Target, value: [‘i-123xxxxxxxxx’],

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 “blueprint” However in the lambda function attached to the route i cannot find the context value from authorizer. How can i get the values from context[key] ? Answer 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. Although, when I use s3_client.download_file i get the following error: When i

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 lambda configuration to use the handler called handler rather than

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 the contents of a

Advertisement