Use CreateProject with an AWS SDK - AWS SDK Code Examples

There are more AWS SDK examples available in the AWS Doc SDK Examples GitHub repo.

Use CreateProject with an AWS SDK

The following code example shows how to use CreateProject.

For more information, see Creating your project.

Python
SDK for Python (Boto3)
Note

There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository.

class Projects: @staticmethod def create_project(lookoutvision_client, project_name): """ Creates a new Lookout for Vision project. :param lookoutvision_client: A Boto3 Lookout for Vision client. :param project_name: The name for the new project. :return project_arn: The ARN of the new project. """ try: logger.info("Creating project: %s", project_name) response = lookoutvision_client.create_project(ProjectName=project_name) project_arn = response["ProjectMetadata"]["ProjectArn"] logger.info("project ARN: %s", project_arn) except ClientError: logger.exception("Couldn't create project %s.", project_name) raise else: return project_arn
  • For API details, see CreateProject in AWS SDK for Python (Boto3) API Reference.