Skip to content
Advertisement

Tag: amazon-web-services

How to describe snapshots by OwnerIds and Filters using boto3

How to describe snapshots owned by me and filtering by tag simultaneously? It describe snapshots owned by me with code below: But when I add “Filters”, its starts ignoring “OwnerIds” and filtering only by tag. I’m follow an official boto3 documentation: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2.html#EC2.Client.describe_snapshots Answer I think the Filters and OwnerIds options are working separately. I expect that the OwnerIds option is

aws sam build not able to build packages which require paramiko due to “Error: PythonPipBuilder:ResolveDependencies”

I’ve been learning the ropes with AWS SAM and have successfully deployed a number of lambdas together with dependencies and other AWS services. However, I seem to have run into a problem when trying to deploy a lambda which relies on some specific dependencies. Here is my requirements.txt file: This file is found in “packageRoot/myCodeUri/requirements.txt” When I run sam build

Pandas read_pickle from s3 bucket

I am working on a Jupyter notebook from AWS EMR. I am able to do this: pd.read_csv(“s3:\mypath\xyz.csv’). However, if I try to open a pickle file like this, pd.read_pickle(“s3:\mypath\xyz.pkl”) I am getting this error: However, I can see both xyz.csv and xyz.pkl in the same path! Can anyone help? Answer Pandas read_pickle supports only local paths, unlike read_csv. So you

ERROR: Bucket name must match the regex “^[a-zA-Z0-9.-_]{1,255}$”

When I try to upload images to a bucket, it throw an error “Invalid bucket name “thum.images “: Bucket name must match the regex “^[a-zA-Z0-9.-_]{1,255}$””. I think there is nothing wrong with a bucket name. This is my code to upload image: Answer The “Invalid bucket name “thum.images “: Bucket name must match the regex “^[a-zA-Z0-9.-_]{1,255}$”” error means just what

BOTO3 – generate_presigned_url for `put_object` return `The request signature we calculated does not match the signature you provided`

I’m trying to create a presigned url that will help some customers to upload files . Here my test script that is currently working But if I’m adding: to Params (or add some metadata following the information in the put_object documentation I receive back from the server: I’ve open also a issue on BOTO3: https://github.com/boto/boto3/issues/1722 Answer This is covered in

AWS region in AWS Glue

How can I get the region in which the current Glue job is executing? When the Glue job starts executing, I see the output Detected region eu-central-1. In AWS Lambda, I can use the following lines to fetch the current region: However, it seems like the AWS_REGION environment variable is not present in Glue and therefore a KeyError is raised:

Advertisement