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

Need to create a snapshot of a volume using python3 and boto3 for a specific region

I am having a need to create snapshot of all volumes present in a region in aws. This script must be able to create snapshot of all the volumes in us-east-2 region I have used the below script but its only taking snapshot of my default region. How…
2
votes
1 answer

Can't log MLflow artifacts to S3 with docker-based tracking server

I'm trying to set up a simple MLflow tracking server with docker that uses a mysql backend store and S3 bucket for artifact storage. I'm using a simple docker-compose file to set this up on a server and supplying all of the credentials through a…
2
votes
0 answers

How do I query CloudWatch metrics for ALL (1000+) EC2 instances that ran during a specified timeframe with Boto3?

I want to query CloudWatch metrics for all EC2 instances in my account (1000+) that reported them during a specific 1 hour time frame (load test) using Boto3. It is expected that instances would have been brought up/down by auto-scaling during the…
2
votes
1 answer

boto3 KeyConditionExpression on both partition and sort key

So i have the following schema: domain (partition key) time_stamp (sort key) I am (attempting) to use boto to query dynamo. I want to return all records with a given domain, after a given time_stamp. I have tried a couple of different approaches to…
2
votes
0 answers

amazon web services - how to get all alarms except autoscaling?

I want to use python's boto3 library to get all open alarms that aren`t related to autoscaling. So, basically, all alarms that you see, when you click "Hide Auto Scaling alarms" in Cloudwatch.
2
votes
2 answers

List RoleNames based on Action in AssumeRolePolicyDocument using boto3

I am using below python code to list all the IAM Role Names. from boto3 import Session import logging from botocore.exceptions import ClientError logger = logging.getLogger(__name__) def list_iam_roles(profile): boto_sess =…
Aziz Zoaib
  • 661
  • 8
  • 21
2
votes
0 answers

AWS boto3 S3 delete_objects fails to Unable to parse XML response

I have a a batch delete, deleting over 100 records so I am chunking the request. The error is below this error occurs INFREQUENTLY, I would say 1 out of 200 requests. This is in a AWS Glue job so at this time I do not have better logging. But I am…
vfrank66
  • 1,318
  • 19
  • 28
2
votes
0 answers

How to Change the data type of a cloumn(schema) using aws athena through query

I have uploaded my data and started the crawler but now i want to change the datatype of one perticular column in the glue crawler for example cloumn 1. name its datatype is string and 2. day its datatype is double now i want to change the day…
2
votes
0 answers

Python pip3 : Getting ConnectionResetError: [Errno 104] Connection reset by peer when installing python-dateutil

I am trying to install botocore and boto3 package but I am getting following error []$ pip3 install --user botocore Collecting botocore Using cached botocore-1.24.39-py3-none-any.whl (8.7 MB) Requirement already satisfied: urllib3<1.27,>=1.25.4…
Pankaj Kolhe
  • 241
  • 1
  • 4
  • 20
2
votes
0 answers

AWS SQS - boto3 HTTPClientError - tuple index out of range

Intermittently seeing this error when enqueuing SQS messages with boto. The same operation succeeds upon retry. This is with boto==1.21.28, botocore==1.24.28 Is it possible this could be a bug in botocore? [ERROR] HTTPClientError: An HTTP Client…
Andy
  • 31
  • 5
2
votes
2 answers

How to configure VSCode for multiple AWS Accounts

I have two AWS Accounts configured in my local. One with the default profile and another with a named profile. I am able to use the AWS CLI to connect to both the accounts and perform operations as follows. I need to do the same using python and I…
aveek
  • 188
  • 6
2
votes
1 answer

how can we get contents of a buildspec.yml file from each codebuild project through Boto3 API

I am not able to find out any function which can get the content of buildspec.yml file. what i have been able to do so far is list all the projects in my AWS account "`" client = boto3.client('codebuild') response = client.batch_get_projects( …
Sam
  • 21
  • 2
2
votes
0 answers

LocalStack Kinesis Lambda sets StartingPosition to LATEST no matter what

I have a simple localstack pipeline: Kinesis with a single shard Single lambda function reading the data When setting the lambda function event_source_mapping the StartingPosition is always being set to LATEST regardless of what was input. I have…
ak_slick
  • 1,006
  • 6
  • 19
2
votes
1 answer

How to list all deployed aws resources with aws cdk

I have an AWS Cdk deployer application that deployed multiple resources in AWS. The application uses a config file that acts as an input file and using that it deployed multiple was ecs task in a fargate cluster and placed them behind an application…
Dcook
  • 899
  • 7
  • 32
2
votes
0 answers

Calling a redshift stored procedure through Lambda timing out

I have a stored procedure in Redshift that I want to call using my Lambda function. I'm using boto3 redshift-data API to do this. My Lambda looks something like this: import boto3 client = boto3.client('redshift-data') def execute_query(Query): …