Posts

Showing posts with the label boto3

DynamoDB and Boto3 error on BatchGetItem operation: “The provided key element does not match the schema”

Image
Clash Royale CLAN TAG #URR8PPP DynamoDB and Boto3 error on BatchGetItem operation: “The provided key element does not match the schema” I am having difficulty with the Boto3/DynamoDB BatchGetItem operation. I would greatly appreciate any help or guidance! I'm pretty new to python/aws so sorry in advanced if this is a novice question. When I perform the operation, I get this error: botocore.exceptions.ClientError: An error occurred (ValidationException) when calling the BatchGetItem operation: The provided key element does not match the schema Here is my code: import boto3 dynamodb = boto3.resource('dynamodb', region_name='us-west-2') response = dynamodb.batch_get_item( RequestItems={ 'test': { 'Keys': [ { 'item_ID': { 'S': '1' } }, { 'item_ID': { ...

boto3 / s3 - how can you connect with uid/pwd in like you could previously ?

Image
Clash Royale CLAN TAG #URR8PPP boto3 / s3 - how can you connect with uid/pwd in like you could previously ? I have some code which I want to port to boto3. Previously it was possible to do this : conn = boto.connect_s3(sys.argv[1], sys.argv2) In the current documentation it's assumed that you have a config file setup with the uid/pwd in it or that you use environment variables and so there is no explicit passing of the uid/pwd when initiating a connection. Is it now impossible to to just pass in the values as per my example or is there some way I've missed in the documentation ? Thanks See: Credentials — Boto 3 Docs documentation – John Rotenstein 20 mins ago 1 Answer 1 When writing AWS Python code, the SDK can automatically find your AWS credent...