Questions tagged [boto3]

Boto 3 - The Amazon Web Services (AWS) SDK for Python

About

Boto is the Amazon Web Services (AWS) software development kit (SDK) for Python, which allows Python developers to write software that makes use of services like Amazon S3 and Amazon EC2. Boto provides an easy to use, object-oriented API as well as low-level direct service access.

Links

7627 questions
2
votes
2 answers

DynamoDB query Filter Expression not working

result = dynamodb_table.query( FilterExpression=filterexpression, KeyConditionExpression=Key(lookup_key).eq(eval_value), ScanIndexForward=False, …
2
votes
1 answer

How to change the default aws region in boto3 python?

I am trying to connect to the amazon Rekognition service in region us-east-1. However boto3 always connects to us-west-2. I have run $ aws configure list and the credentials and specified region seem to be correct there I remember when I first…
dude
  • 63
  • 7
2
votes
1 answer

Dynamically Insert/Update Item in DynamoDB With Python Lambda using event['body']

I am working on a lambda function that gets called from API Gateway and updates information in dynamoDB. I have half of this working really dynamically, and im a little stuck on updating. Here is what im working with: dynamoDB table with a partition…
2
votes
0 answers

How to use SDK-generated presigned S3 URLs with multi-region access points?

I have created a multi-region access point (MRAP) to access replicated buckets across different locations. I have a Flask API that uses boto3 to connect to S3 and make requests. According to AWS, for SDK requests for MRAP, the bucket name should be…
2
votes
0 answers

botocore.exceptions.SSLError: SSL validation failed on aws3 endpoint

i'm trying to download from s3 public bucket and got ssl error, while 2 weeks ago everything works and i didnt change anything on my workspace. i'm not sure why? Meta python: Python 3.6.9 pip Version:…
DevFromI
  • 191
  • 1
  • 20
2
votes
0 answers

How to call put_items async in python dynamodb, if write function and dynamodb initialization are in separated functions

Newbie to python here. I am changing some code which handles dynamodb write from sync to async, to reduce the latency. Current source code uses boto3 to connect to dynamodb: import boto3 """ Create dynamodb connection """ def…
jsh6303
  • 2,010
  • 3
  • 24
  • 50
2
votes
1 answer

Using python Download the latest file from s3 bucket inside folder not from inside folder --folder

I want to download the latest file from s3-bucket inside folder only. Actually inside folder there are multiple folders along with files. But i need to download only file of latest date and upload it into one folder by selecting from multiple…
user 98
  • 167
  • 2
  • 12
2
votes
0 answers

AWS Firehose Delivery Error: DynamicPartitioning.MetadataExtractionFailed

I sent some data using boto3 API to my destination S3 bucket which is predesigned dynamically partitioned. Here is what I set: And here is what I do to send the data: import base64 import boto3 import json def put_batch_data_stream(input,…
2
votes
2 answers

AWS X-Ray Tracing from Lambda to SNS to SQS to another Lambda (Python3, boto3)

I have a question similar to this one. I want to generate a service map that allows me to view the orchestration of my serverless architecture, especially across SNS and SQS between 2 lambdas. The difference being that I am using Amazon's SQS in…
Ryan T.
  • 197
  • 1
  • 15
2
votes
1 answer

Connect to s3 using ARN role url using boto3 Python

I want to connect to the S3 using arn. but not sure how I can make a connection I am looking for a code something like. ARN = boto3.client('s3', 'arn:aws:iam::****:role/***') Is there any way that I can make a connection using arn?
Py1996
  • 219
  • 1
  • 15
2
votes
0 answers

Error while publishing message to FIFO SNS topic through boto3 code

I am getting an error occurred (InvalidParameter) when calling the Publish operation: 'Invalid parameter: The MessageGroupId parameter is required for FIFO topics'. logging.info(f"Preparing to the event notification to the topic…
Neo Vijay
  • 31
  • 3
2
votes
2 answers

Task Already Exists: AWS RDS Snapshot Export to Parquet

I'm using boto3 to export an RDS snapshot to S3 parquet. When creating an S3 export from an RDS snapshot, you have to specify the ExportTaskIdentifier. If you've run an export previously with an identifier and try to use it again, an error is…
2
votes
0 answers

InvalidCiphertextException: An error occurred (InvalidCiphertextException) when calling the Decrypt operation: aws Lambda with python

I am working in AWS Lambda Function with python (boto3) for decrypting a key that I am getting from the Cognito to my lambda function as an event parameter (in encrypted format). I have set the KMS symmetric key for encryption and decryption. But it…
2
votes
2 answers

How to list all the log group in Cloudwatch using boto3

How to I list all the log groups in Cloudwatch using Boto3. When I try the below syntax. I get error. client = boto3.client('logs') response = client.describe_log_groups(limit=51) validation error detected: Value '51' at 'limit' failed to…
kumar
  • 8,207
  • 20
  • 85
  • 176
2
votes
1 answer

How do I use build_full_result() in Boto3

I was Googling around to understand how boto3 paginator works, and found a solution that potentially doesn't require writing any logic with NextToken and While loops. Still, I'm not quite sure what I'm getting when I'm using this: client =…
Daniel
  • 621
  • 5
  • 22