I am working with AWS Personalize and the Python SDK (boto3). All goes well until I try to include the context param in the request. While everything works as expected within the Personalize > Campaigns UI for testing the results, when I try to use the following code:
response = personalizeRt.get_recommendations(
campaignArn = 'arn:aws:personalize:XXXXXXXXXX:campaign/interactions-meta',
userId = '43f0c7fd-4d89-4752-9c88-2fe5bf7ac830',
context={
'GENRES' : '42'
}
)
I get the following error:
Unknown parameter in input: "context", must be one of: campaignArn, itemId, userId, numResults
Has anyone else seen this error? And if so, how did you resolve it. Thanks in advance.