Category "boto"

Programmatically establish boto3 sessions with AWS SSO

I'm trying to establish a boto3 session with boto3.session.Session(profile_name='foo') but getting an UnauthorizedSSOTokenError error: botocore.exceptions.Unau

How to filter AWS roles by tags in boto3?

I'm trying to get list of roles with special tags Python version 3.9 Boto3 version 1.16.25 There is my code iam = boto3.client('iam', region_name='us-east-1') r

How to use the AWS Python SDK while connecting via SSO credentials

I am attempting to create a python script to connect to and interact with my AWS account. I was reading up on it here https://boto3.amazonaws.com/v1/documentati

How to test mocked (moto/boto) S3 read/write in PySpark

I am trying to unittest a function that writes data to S3 and then reads the same data from the same S3 location. I am trying to use a moto and boto (2.x) to ac

[Django][AWS S3] botocore.exceptions.clienterror an error occurred (accessdenied) when calling the PutObject operation

I am trying to connect Django project to AWS S3. settings.py contains below: AWS_ACCESS_KEY_ID = #ID AWS_SECRET_ACCESS_KEY = #Key AWS_STORAGE_BUCKET_NAME = #B

ClientError:An error occurred(AccessDenied)when calling the AssumeRole operation:MultiFactorAuthentication failed with invalid MFA one time pass code

import boto import boto3 from boto.s3.connection import S3Connection from boto.sts import STSConnection # Prompt for MFA time-based one-time password (TOTP) mf

How to use asyncio to download files on s3 bucket

I'm using the following code to download all my files in a s3 bucket: def main(bucket_name, destination_dir): bucket = boto3.resource('s3').Bucket(bucket_n

DynamoDBNumberError on trying to insert floating point number using python boto library

Code snippet : conn = dynamo_connect() company = Table("companydb",connection=conn) companyrecord = {'company-slug':'www-google-com12','founding-year':1991,

Downloading the files from s3 recursively using boto python.

I have a bucket in s3, which has deep directory structure. I wish I could download them all at once. My files look like this : foo/bar/1. . foo/bar/100 . .

Trouble setting cache-cotrol header for Amazon S3 key using boto

My Django project uses django_compressor to store JavaScript and CSS files in an S3 bucket via boto via the django-storages package. The django-storages-relate

Trouble setting cache-cotrol header for Amazon S3 key using boto

My Django project uses django_compressor to store JavaScript and CSS files in an S3 bucket via boto via the django-storages package. The django-storages-relate

Using Boto to find to which device and EBS Volume is mounted

How do I find to which device an EBS Volume is mounted with Python Boto v2.0? boto.ec2.Volume has some interesting properies like attachment_state and volume_s

Using Boto to find to which device and EBS Volume is mounted

How do I find to which device an EBS Volume is mounted with Python Boto v2.0? boto.ec2.Volume has some interesting properies like attachment_state and volume_s