Amazon Personalize
Developer Guide

This is prerelease documentation for a service in preview release. It is subject to change.

Creating a Campaign

After you have trained your solution, you can deploy it as a campaign. You can create and update a campaign by using the AWS console, or by using the AWS SDK.

To create a campaign with the SDK call CreateCampaign and pass the following:

  • A name for the campaign.

  • The Amazon Resource Name (ARN) of the solution to deploy.

  • An update mode.

If the update mode is AUTO, the latest version of the solution is automatically deployed whenever the solution is updated. If it is MANUAL the campaign must be manually updated by calling UpdateCampaign. If you want to create a campaign using a specific version of a solution, specify the optional SolutionVersionArn input parameter.

To create a campaign

  1. Create a solution to deploy. For more information, see Creating a Solution.

  2. Use the following code to create a campaign.

    import boto3 import io if __name__ == "__main__": personalize = boto3.client('personalize', region_name='us-west-2') response=personalize.create_campaign( name='campaign name', solutionArn='solution arn', updateMode='AUTO' ) print('Campaign arn: ' + response['campaignArn'])

Amazon Personalize provides operations for managing campaigns such as ListCampaigns to list the campaigns you have created. You can delete a campaign by calling DeleteCampaign. If you delete a campaign, the solutions that are part of the campaign are not deleted.

After you have created your campaign, your deployed solution is able to make recommendations. For more information, see Getting Recommendations.