Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Update a model package stage and status example (boto3)

Focus mode
Update a model package stage and status example (boto3) - Amazon SageMaker AI

To update a model package stage and status, you will need to assume an execution role with the relevant permissions. The following provides an example on how you can update the stage status using the UpdateModelPackage API using AWS SDK for Python (Boto3).

In this example, the ModelLifeCycle stage "Development" and stage status "Approved" condition keys for the UpdateModelPackage API action has been granted to the your execution role. You can include a description in stage-description. See Set up Staging Construct Examples for more information.

from sagemaker import get_execution_role, session import boto3 region = boto3.Session().region_name role = get_execution_role() sm_client = boto3.client('sagemaker', region_name=region) model_package_update_input_dict = { "ModelLifeCycle" : { "stage" : "Development", "stageStatus" : "Approved", "stageDescription" : "stage-description" } } model_package_update_response = sm_client.update_model_package(**model_package_update_input_dict)
PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.