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
1 answer

Extremely slow batch_write operations with boto3 and dynamodb-local

I am trying to load some GBs of data stored locally in 6 txt files inside some tables in a dockerized local Dynamodb instance using Python3 and the boto3 library. The problem is the process speed, the estimated time for loading a single file's data…
2
votes
2 answers

AWS Presigned URL valid for more than 7 days

Just wanted to know is there a way to use AWS S3 Presigned URL for more than 7 Days using V4 of Presigned URL.
2
votes
1 answer

Can I use "Config" object with boto3 resource?

I would like to use a boto3 config object to configure connection timeout and other attributes when interacting with DynamoDB through boto3. I have already written my code using a boto3 resource, and all the examples I have been able to find…
2
votes
0 answers

How to Group by more than 2 fields when using the AWS Cost Explorer(API) get_cost _and_usage function?

I'm currently trying to make some reports about my AWS Cost and Usage via the Cost Explorer API(https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ce.html) So far, I have been able to use the "get_cost_and_usage function" to…
2
votes
1 answer

AccessDeniedException when calling the StartQuery operation

I am getting an error when I try to start aws query using python boto3 Error message: There was an error in error_handler: An error occurred (AccessDeniedException) whencalling the StartQuery operation: User:…
2
votes
0 answers

AWS lambda returns access denied when accessing S3 bucket

I have a lambda function deployed as a container image. My lambda handler in the docker image is accessing my s3 bucket for downloading one or more files. When I invoke my lambda function locally using the boto3 lambda client, sometimes it works…
nmnsharma007
  • 235
  • 3
  • 13
2
votes
2 answers

Is it possible to list bucket using AWS Lambda based on tags?

Have a requirement like need to delete buckets that are 15 days old and having a tag like Type: Test. Is this achievable using an AWS Lambda function?
Jonty
  • 21
  • 4
2
votes
0 answers

Tagging AWS glue tables

I wanted to know if tagging of tables is possible in aws glue in any way. I know that in documentation , it is not given that it is possible for tables. It also is given that the tagging of a database is also not possible but I was able to do so…
2
votes
1 answer

Trying to return multiple values in output

I'm trying to get running hours on an EC2 tagged instance with (Tag-periods - active) in an sns email notification, however I'm new to Python. Nevertheless, even though I have more than 5 instances with these tag values, I only returned one of them.…
2
votes
1 answer

Custom Exception in Core Application Unrecognised in Module

In my core application I have a custom Exception 'timeout' which when caught should return a message and trigger 'sys.exit()' to terminate the application. timeout Exception: class timeout(Exception): def __init__(self, msg): …
Peter Jordanson
  • 61
  • 2
  • 16
2
votes
1 answer

boto3 s3 client documented close() method missing?

According to https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html#S3.Client.close, this method should exist (and I think is described elsewhere as addressing the infamous unclosed SSL socket warning). Is this just…
Scott
  • 1,247
  • 3
  • 10
  • 21
2
votes
3 answers

How to invoke Lambda function using boto3 and passing parameters

This time I'm looking for passing parameters to lambda invoke using boto3.client instead of make a request to API gateway. Assume I developed a lambda function that can be invoked through api get. ie: https://linktolambda/ and now I am…
ninsignares
  • 29
  • 1
  • 5
2
votes
1 answer

Boto3 timeout troubleshooting

I am trying to troubleshoot a situation. I am initiating a Boto3 client like this: s3_client = boto3.client('s3') Then I am iterating over a number of files and uploading them using: s3_client.upload_file() My problem is that every now and then I…
mangotango
  • 326
  • 4
  • 15
2
votes
2 answers

The security token included in the request is invalid. When no profile specified

When running this: session = boto3.session.Session() client = session.client(service_name="secretsmanager", region_name='region') secret_response = client.get_secret_value(SecretId='secret_name') print(secret_response) This is the error that I…
2
votes
0 answers

How can I download a file from an S3 bucket after I SSH to a remote machine/edge node to a particular path in the same remote machine?

I am relatively new to Airflow and am trying to solve a particular problem. I wanted to know how I could download my file residing in an S3 bucket after SSH to a remote machine/client through the SSHOperator. Can I simply use some bash script (I…