I am trying to get recommendations from AWS Personalize recommender ( Recommended For You ) via AWS cli.
Here is the command which I am using
aws --debug personalize-runtime get-recommendations --user-id {a-valid-user-id} --recommender-arn {recommender-arn} --region us-east-1 --num-results 10
and here is the output I am getting
2023-08-01 12:08:23,003 - MainThread - awscli.clidriver - DEBUG - Arguments entered to CLI: ['--debug', 'personalize-runtime', 'get-recommendations', '--user-id', 'ac2669da-cce0-42c0-935a-4bae82d48010', '--recommender-arn', 'arn:aws:personalize:us-east-1:300133635739:recommender/just-for-you', '--region', 'us-east-1', '--num-results', '10']
2023-08-01 12:08:23,003 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function add_scalar_parsers at 0x7fe6f15feca0>
2023-08-01 12:08:23,003 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function register_uri_param_handler at 0x7fe6f1bbe820>
2023-08-01 12:08:23,003 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function inject_assume_role_provider_cache at 0x7fe6f1b1a550>
2023-08-01 12:08:23,006 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function attach_history_handler at 0x7fe6f1747430>
2023-08-01 12:08:23,007 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/lib/python3/dist-packages/botocore/data/personalize-runtime/2018-05-22/service-2.json
2023-08-01 12:08:23,007 - MainThread - botocore.hooks - DEBUG - Event building-command-table.personalize-runtime: calling handler <function add_waiters at 0x7fe6f160c5e0>
2023-08-01 12:08:23,010 - MainThread - awscli.clidriver - DEBUG - OrderedDict([('campaign-arn', <awscli.arguments.CLIArgument object at 0x7fe6f14debb0>), ('item-id', <awscli.arguments.CLIArgument object at 0x7fe6f14deaf0>), ('user-id', <awscli.arguments.CLIArgument object at 0x7fe6f14deac0>), ('num-results', <awscli.arguments.CLIArgument object at 0x7fe6f14dea60>), ('context', <awscli.arguments.CLIArgument object at 0x7fe6f14dea30>)])
2023-08-01 12:08:23,010 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.personalize-runtime.get-recommendations: calling handler <function add_streaming_output_arg at 0x7fe6f1604310>
2023-08-01 12:08:23,010 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.personalize-runtime.get-recommendations: calling handler <function add_cli_input_json at 0x7fe6f1b1af70>
2023-08-01 12:08:23,010 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.personalize-runtime.get-recommendations: calling handler <function unify_paging_params at 0x7fe6f168a430>
2023-08-01 12:08:23,013 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/lib/python3/dist-packages/botocore/data/personalize-runtime/2018-05-22/paginators-1.json
2023-08-01 12:08:23,013 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.personalize-runtime.get-recommendations: calling handler <function add_generate_skeleton at 0x7fe6f1668670>
2023-08-01 12:08:23,014 - MainThread - botocore.hooks - DEBUG - Event before-building-argument-table-parser.personalize-runtime.get-recommendations: calling handler <bound method OverrideRequiredArgsArgument.override_required_args of <awscli.customizations.cliinputjson.CliInputJSONArgument object at 0x7fe6f14ded60>>
2023-08-01 12:08:23,014 - MainThread - botocore.hooks - DEBUG - Event before-building-argument-table-parser.personalize-runtime.get-recommendations: calling handler <bound method GenerateCliSkeletonArgument.override_required_args of <awscli.customizations.generatecliskeleton.GenerateCliSkeletonArgument object at 0x7fe6f1545b20>>
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:
aws help
aws <command> help
aws <command> <subcommand> help
aws: error: the following arguments are required: --campaign-arn```
The CLI command always demand for campaign arn, How to do it for recommenders?