I got so many different errors, I don’t even know which is pertinent to mention but it’s not about the credentials because I can upload files already and I can read a txt file. Now I want to read a docx. I created a form in my index.html with just a text area to write the exact name of the
Tag: amazon-web-services
How to parse Boto3 200 response for copy_object request
I am new to Python and I’m writing an AWS lambda that copies files from one bucket to another. I am using the Boto3 library and have come across the following in the documentation: A copy request might return an error when Amazon S3 receives the copy request or while Amazon S3 is copying the files. If the error occurs
List of all roles with attached policies with Boto3
Found a useful thread here that helped me get part of a script to get a list of all roles and its attached policies: I am trying to figure out how to make this work so I get a list of all the roles in our AWS account and their attached policies. I am pretty new to Python/Boto3 so any
AWS Lambda function with placeholders
I am working on AWS Lambda function for my python function. I have a python function that calls an IAM policy form a file and populates it using the function. This is my function, name of the file is template_utils.py”: This is my policy file named “meta_templates.py” I want to create a lambda handler that does the same thing with
Load JSON data from CloudTrail into DynamoDB using Boto
I am working on a Boto3 script that can load the attributes from Cloudtrail into Dynamodb. The format of my cloudtrail logs is JSON. I am fairly new to DynamoDB and I am not sure where I am making a mistake. I’m trying to store “S3BucketName” as well as the name of the bucket which is “goodbucket3”. Name for the
Getting “not all arguments converted during string formatting” exception in AWS Lambda function
I am trying to write an AWS Lambda function in python that retrieves records from a table. I have no trouble running the code locally. However, when I run the code in AWS Lambda function, I get the error “not all arguments converted during string formatting”. The query is executed by the following code: class SalesReceipt(declarative_base(), PersistentBase.PersistentBase): tablename = ‘sales_receipts’
when calling the UpdateMethod operation getting invalid path error for /methodIntegration/uri
I’m updating an API in AWS API Gateway. This is my lambda function: This works fine and updates “API key required” field, but when I try to update the “URI” field it throws the following error. “errorMessage”: “An error occurred (BadRequestException) when calling the UpdateMethod operation: Invalid patch path /methodIntegration/uri”, The path looks fine to me. Docs: https://docs.aws.amazon.com/cli/latest/reference/apigateway/update-method.html Answer apiKeyRequired
Signature Error while updating S3 object metadata through boto3
I have a lambda function that takes S3 object from S3 events and updates it with the custom metadata. Here is the boto3 script: When I run the script, it gives me the following error: An error occurred (SignatureDoesNotMatch) when calling the CopyObject operation: The request signature we calculated does not match the signature you provided. Check your key and
Python SSH tunnel into EC2 and connect to DocumentDB
I have been attempting to SSH tunnel into an EC2 instance and connect to DocumentDB that is located in the same VPC. I’ve tried all of the solutions I could dig up online with no luck. I am using the ssh_pymongo module, which wraps SSHTunnelForwarder. I am able to SSH directly into the EC2 instance and connect to the DocumentDB
AWS Lambda – Combine multiple CSV files from S3 into one file
I am trying to understand and learn how to get all my files from the specific bucket into one csv file. I have the files that are like logs and are always in the same format and are kept in the same bucket. I have this code to access them and read them: It does print them with separation between