I am connecting to AWS dynamodb using DAX service. While querying data from the DAX I face no issues and I am able to get the data. But when I try to insert new Items to DynameDB using DAX I am getting below error.
An error occurred(Unknown) when calling the defineAttributeListId operation: Client does not have permission to invoke DefineAttributeListId.
Code:
import amazondax
def put_movie(title, year, plot, rating):
with amazondax.AmazonDaxClient.resource(endpoint_url="http://localhost:8000") as dax
table = dynamodb.Table('Movies')
response = table.put_item(
Item={
'year': year,
'title': title,
'info': {
'plot': plot,
'rating': rating
}
}
)
return response
if __name__ == '__main__':
movie_resp = put_movie("The Big New Movie", 2015,
"Nothing happens at all.", 0)