Wednesday, July 30, 2025
Google search engine
HomeTechnologyBig DataCarry out per-project price allocation in Amazon SageMaker Unified Studio

Carry out per-project price allocation in Amazon SageMaker Unified Studio


Amazon SageMaker Unified Studio is a single knowledge and AI improvement setting the place yow will discover and entry your knowledge and act on it utilizing AWS assets for SQL analytics, knowledge processing, mannequin improvement, and generative AI utility improvement.

SageMaker Unified Studio is a part of the following era of Amazon SageMaker. SageMaker brings collectively AWS synthetic intelligence and machine studying (AI/ML) and analytics capabilities and delivers an built-in expertise for analytics and AI with unified entry to knowledge.

With SageMaker Unified Studio, you possibly can create domains and initiatives, offering a single interface to construct, deploy, execute, and monitor end-to-end workflows. This method helps drive collaboration throughout groups and facilitates agile improvement.

SageMaker Unified Studio implements useful resource tagging when AWS assets are provisioned. You should use these tags to trace and allocate prices for the varied assets created as a part of the domains and initiatives inside SageMaker Unified Studio.

This submit demonstrates the best way to carry out price allocation utilizing these useful resource tags, so finance analysts and enterprise analysts can implement and comply with Monetary Operations (FinOps) greatest practices to regulate and monitor cloud infrastructure prices.

Resolution overview

The next diagram illustrates how tagging works inside SageMaker domains.

Earlier than reviewing the implementation particulars, let’s discover a number of key SageMaker ideas: area, challenge, challenge profile, and setting blueprint. For extra info, confer with the SageMaker Unified Studio Administrator Information.

Area – A website is an organizing entity created by an administrator. Directors assign customers to domains to allow collaboration utilizing related instruments, belongings, and assets. A website can signify a enterprise group or a enterprise unit containing individuals who collaborate and share assets. After creating a website, directors share the URL with customers to entry the portal.
Tasks – Tasks exist inside every area. A challenge gives a boundary the place customers can collaborate on a enterprise use case. Customers can create and share knowledge, computing, and different assets inside initiatives.
Challenge profile – If you create a challenge, you could choose a challenge profile. A challenge profile is a template that governs infrastructure for the challenge, simplifying challenge creation with preconfigured settings and assets prepared to be used.
Surroundings blueprints – Surroundings blueprints are reusable templates for creating environments. They outline settings for useful resource deployment and supply info for provisioning. Every blueprint makes use of an AWS CloudFormation template to create assets in a repeatable and scalable method.

For efficient price monitoring and allocation, ensure that your SageMaker assets have correct tags. You possibly can configure these as price allocation tags to group and filter throughout AWS Billing and Price Administration instruments (corresponding to AWS Price Explorer and AWS Knowledge Exports).

As of this writing, SageMaker domains assist tagging on the blueprint, area, challenge, and setting stage. If you create initiatives or add assets inside an current challenge, the next tags are mechanically added to assets via CloudFormation useful resource tags, configured for every blueprint stack:

AmazonDataZoneBlueprint – Sort of blueprint akin to this blueprint’s CloudFormation template (for instance, Tooling)
AmazonDataZoneDomain – Amazon DataZone area related to this CloudFormation template
AmazonDataZoneEnvironment – Amazon DataZone setting ID related to this CloudFormation template
AmazonDataZoneProject – Amazon DataZone challenge related to this CloudFormation template

To trace prices in SageMaker Unified Studio, you’ll carry out the next steps:

Create a SageMaker area and challenge.
Configure price and billing settings by enabling price allocation tags.
(Non-obligatory) Generate prices in your challenge.
Observe prices utilizing Price Explorer and Knowledge Exports.

Stipulations

This submit requires the next configurations in your AWS account:

AWS IAM Id Middle enabled in your group administration account (most popular) or within the member account the place you’ll use SageMaker Unified Studio. For directions on enabling IAM Id Middle, confer with Allow IAM Id Middle.
Price Explorer enabled in your group administration account (most popular) or within the member account the place you’ll use SageMaker Unified Studio. For configuration steps, confer with Enabling Price Explorer.

Both legacy AWS Price and Utilization Experiences (AWS CUR) with Amazon Athena integration or Knowledge Exports configured and built-in with Athena for queries. For setup directions, confer with creating Knowledge Exports.

Create a SageMaker Unified Studio area and challenge

Full the next steps to arrange your area and challenge:

Create a SageMaker Unified Studio area utilizing the Fast setup possibility (beneficial for brand spanking new customers) or handbook setup.

After area creation, you can be redirected to the area overview web page.

Select Open Unified Studio.
On the SageMaker Unified Studio console, select Create challenge.
For Challenge profile, select SQL analytics, then select Proceed.

SageMaker Unified Studio create project wokflow (configuration page)

Select Proceed to maintain the default blueprint parameters.
Evaluation the configuration abstract, then select Create challenge.

SageMaker Unified Studio create project wokflow (confirmation page)

After the challenge is created, you can be redirected to the challenge overview web page. Report the challenge ID and area ID.

Project details page showing various details such as project id, project name and project IAM role ARN

Price and billing configuration

As talked about earlier, to trace prices in SageMaker Unified Studio, you could configure price allocation tags. Discuss with Organizing and monitoring prices utilizing AWS price allocation tags for extra details about this characteristic.

Full the next steps:

On the AWS Billing and Price Administration console, underneath Price group within the navigation pane, select Price allocation tags.
Choose the next tags and select Activate:

AmazonDataZoneDomain
AmazonDataZoneProject
AmazonDataZoneEnvironment
AmazonDataZoneBlueprint

The AmazonDataZoneProject and AmazonDataZoneDomain tags correspond to the challenge and area ID values you recorded earlier.

AWS cost allocation tags interface showing the AWS tags that are currently configured as cost allocation tags

Price allocation tags configuration doesn’t apply retroactively. If you wish to monitor prices related to these tags within the AWS Billing and Price Administration instruments earlier than the activation date, you could request a value allocation tag backfill. The backfill operation can take a number of hours to finish.

Generate prices for the challenge

This part explains the best way to generate prices related to the underlying knowledge backend (Amazon Redshift on this case) to look at them utilizing AWS billing instruments. You possibly can skip this part when you’re monitoring prices on an lively challenge.

To generate prices, we use the desk construction used within the Redshift Immersion Labs. Discuss with Create Tables for extra particulars.

To run queries in SageMaker Unified Studio, comply with these steps:

In your challenge, select New after which Question.

Image that shows the query button within the SageMaker Unified Studio project overview page allowing users to open the query editor tool

Use the Amazon Redshift Serverless compute configured for the challenge to generate the prices:

Select the Redshift (Lakehouse) connection.
Select the dev database.
Select the challenge schema.
Select Select.

Image that shows the conection selector available in SageMaker Unified Studio. In this case Redshift LakeHouse connection is selected with dev database and project schema selected underneath

Copy and execute the SQL statements supplied within the following GitHub repo into the SageMaker Unified Studio question editor to create, load, and validate knowledge on the tables.

View of the Query editor within the SageMaker Unified Studio portal. Image contains two SQL queries (create tables and COPY data operation)

After working these steps, you should have generated some Amazon Redshift prices that shall be current for additional evaluation in AWS Billing and Price Administration instruments. Nevertheless, these instruments (Price Explorer and Knowledge Exports) are refreshed least one time each 24 hours, so that you would possibly want to attend as much as 24 hours earlier than continuing to the following part.

Monitoring prices in AWS Billing and Price Administration instruments

With the price allocation tags enabled, you need to use AWS Billing and Price Administration instruments to investigate and monitor prices, together with Price Explorer and Knowledge Exports. For extra details about utilizing these instruments, confer with the AWS Billing and Price Administration Person Information.

Examine prices in Price Explorer

You possibly can verify your SageMaker Unified Studio prices utilizing Price Explorer. With this device, you possibly can view and analyze your prices and utilization via an interface with pre-built filters and aggregation capabilities for numerous metrics. For extra info, confer with the Analyzing your prices and utilization with AWS Price Explorer.

To entry Price Explorer, full the next steps:

On the AWS Administration Console, select your account identify within the high proper nook and select Billing Dashboard, or seek for “Price Explorer” within the console search bar.
On the Billing Dashboard, select Price Explorer within the navigation pane.
For first-time customers, select Launch Price Explorer to allow the service.

AWS can take as much as 24 hours to organize your price knowledge.

To view total prices per challenge, configure the next report parameters:

For Date Vary, enter your vary.
For Granularity, select Month-to-month.
For Dimension, select Tag.
For Tag, enter your tag (AmazonDataZoneProject).

Image that shows how to group by a particular dimension (tag) in cost explorer

The next screenshot reveals a pattern report.

AWS cost explorer report showing costs by SageMaker Unified Studio project

To view completely different service prices for a selected challenge, replace the next parameters:

For Dimension, select Service.Image that shows how to group by a particular dimension (service) in cost explorer
For Tag¸ select AmazonDataZoneProject and select the worth of the challenge you need to examine (on this case, 4z9d694nbsnyqx).

Image that illustrates how to filter by a specific dimension (tag) and value in cost explorer

The outcomes ought to look much like the next screenshot.

AWS cost explorer report showing service costs for a particular SageMaker Unified Studio project

Examine prices utilizing Knowledge Exports

With Knowledge Exports, you possibly can question your price and utilization in AWS with the utmost flexibility diploma in comparison with different instruments corresponding to Price Explorer. It gives a complete set of measures and dimensions which you can embody within the export to create a personalised report. This report is then delivered to Amazon Easy Storage Service (Amazon S3) so you possibly can configure it with Athena, so it may be queried utilizing SQL or enterprise intelligence (BI) instruments corresponding to Amazon QuickSight.

This submit assumes you’ve already configured a knowledge export and you’ve got it built-in with Athena (confer with Processing knowledge exports for extra info). For directions on organising CUR and Athena integration, confer with Creating studies.

Examine prices by challenge

Use the next question to verify prices by challenge:

SELECT product_servicecode,
    product_product_family,
    resource_tags( ‘user_amazon_data_zone_project’ ) as user_amazon_data_zone_project,
    spherical(sum(line_item_unblended_cost), 2) prices,
    line_item_line_item_description
FROM “data_exports”.”data_exportdata”
the place resource_tags ( ‘user_amazon_data_zone_project’ ) != ”
group by product_product_family,
    product_servicecode,
    resource_tags( ‘user_amazon_data_zone_project’ ),
    line_item_line_item_description
order by spherical(sum(line_item_unblended_cost), 2) DESC;

Outcomes will look much like the next screenshot on the Athena console.

Athena SQL query results when querying cost and usage data from data exports

The previous question reveals your prices grouped by:

Challenge (utilizing tags)
Service
Product household, which corresponds to the subtype for a given product utilization cost (for instance, ML Occasion for SageMaker, or Managed Storage for Amazon Redshift)

Examine prices for particular person initiatives

To verify prices for a selected SageMaker Unified Studio challenge (for instance, the pattern challenge 4z9d694nbsnyqx created throughout this walkthrough), you need to use the next question:

SELECT product_servicecode,
    product_product_family,
    resource_tags( ‘user_amazon_data_zone_project’ ) as user_amazon_data_zone_project,
    spherical(sum(line_item_unblended_cost), 2) prices,
    line_item_line_item_description
FROM “data_exports”.”data_exportdata”
the place resource_tags ( ‘user_amazon_data_zone_project’ ) != ”
and resource_tags ( ‘user_amazon_data_zone_project’ ) =
group by product_product_family,
    product_servicecode,
    resource_tags( ‘user_amazon_data_zone_project’ ),
    line_item_line_item_description
order by spherical(sum(line_item_unblended_cost), 2) DESC;

Monitor prices with Knowledge Exports and QuickSight

For those who enabled Athena to work with Knowledge Exports, you too can configure QuickSight to question this knowledge supply. With QuickSight, you possibly can create interactive dashboards to trace SageMaker prices in SageMaker Unified Studio at scale.

Configure entry and permissions

To create CUR dashboards in QuickSight, first full the next steps:

Subscribe to QuickSight and have an writer consumer account. For directions on subscribing to QuickSight, confer with Signing up for an Amazon QuickSight subscription.
Allow entry to Athena and your CUR S3 bucket within the Safety & permissions part of the QuickSight administration console. You want QuickSight administrator permissions to entry this console.

Image shows QuickSight administration console where administrators can edit the AWS services (Athena in this case) that QuickSight is allowed to access

For those who’re utilizing AWS Lake Formation, ensure that your QuickSight consumer is permitted to question the CUR database and desk. For extra details about granting entry in Lake Formation, confer with Granting permissions on Knowledge Catalog assets.

Create a QuickSight dataset

The subsequent step is to create a dataset in QuickSight utilizing a SQL question. For directions on making a dataset with SQL, confer with Utilizing SQL to customise knowledge. Use the next SQL expression:

SELECT product_servicecode,
    product_product_family,
    resource_tags( ‘user_amazon_data_zone_environment’ ) as user_amazon_data_zone_environment,
    resource_tags( ‘user_amazon_data_zone_project’ ) as user_amazon_data_zone_project,
    resource_tags( ‘user_amazon_data_zone_domain’ ) as user_amazon_data_zone_domain,
    line_item_unblended_cost,
    line_item_usage_start_date,
    line_item_line_item_description
FROM “data_exports”.”data_exportdata”
the place resource_tags ( ‘user_amazon_data_zone_environment’ ) != ” or resource_tags ( ‘user_amazon_data_zone_project’ ) != ”

Image of QuickSight dataset preparation page. Shows a SQL query that is used to extract data from the data exports previously configured.

The previous question consists of solely price and utilization knowledge that’s tagged with both user_amazon_data_zone_environment or user_amazon_data_zone_project to deal with SageMaker related prices. To incorporate different AWS prices, you could modify these filters.

Create QuickSight dashboards

Utilizing the authoring capabilities of QuickSight, you possibly can create interactive dashboards the place enterprise stakeholders can discover and monitor prices related to SageMaker Unified Studio initiatives. You should use these dashboards to evaluation related price metrics at a look which might be derived from the Knowledge Exports dimensions and metrics included in your dataset, as proven within the following screenshot. For extra details about including visuals to analyses, confer with Including visuals to Amazon QuickSight analyses.

Example of a QuickSight dashboard consuming data exports cost and usage data. Dashboard contains multiple visuals that illustrate SageMaker Unified Studio costs by project and service

The previous instance reveals a dashboard constructed utilizing QuickSight related to a Knowledge Exports dataset. The dashboard incorporates the next visuals:

KPI visible exhibiting the present month-to-month prices for SageMaker Unified Studio together with the month over month (MoM) variation and historical past
Autonarrative visible analyzing SageMaker Unified Studio prices (highest) by month
Vertical stacked bar chart exhibiting SageMaker Unified Studio prices by month (grouped by challenge)
Donut chart exhibiting SageMaker Unified Studio price by service
Warmth map visible correlating prices by challenge ID and repair

Utilizing this method (QuickSight and Knowledge Exports), you possibly can create extremely customizable dashboards to discover and monitor your SageMaker Unified Studio prices. Moreover, you possibly can create automated studies utilizing the QuickSight reporting characteristic to ship these by electronic mail to the related stakeholders.

Clear up

Delete the assets you created as a part of this submit while you’re executed with them to keep away from month-to-month expenses. This consists of SageMaker assets, created Knowledge Export studies and the QuickSight subscription (in case it was created to visualise prices).

Delete SageMaker assets

Log in to the SageMaker area utilizing an admin position.
Delete the challenge you created.
Delete the SageMaker area.

Delete Knowledge Exports studies

On the AWS Billing console, within the navigation pane, select Price & Utilization Experiences.
Choose the report you need to delete.
Select Delete.
Verify the deletion by selecting Delete report.

For extra details about managing Knowledge Exports, confer with Deleting exports.

Unsubscribe from QuickSight

On the QuickSight console, select your profile identify within the high proper nook.
Select Handle QuickSight.
Select Account settings.
On the backside of the web page, select Delete your QuickSight account.
Evaluation the details about knowledge deletion.
Enter delete to substantiate.
Select Delete.

IMPORTANT NOTE: Earlier than unsubscribing, be sure you backed up any dashboards or analyses you need to preserve. After deletion, you possibly can’t recuperate your QuickSight belongings. For extra details about managing your QuickSight subscription, confer with Deleting your Amazon QuickSight subscription and shutting the account.

Conclusion

Managing prices on a unified platform like SageMaker can appear difficult as a result of it aggregates many instruments and providers with completely different price fashions. On this submit, we confirmed the best way to use AWS Billing and Price Administration instruments to mixture and categorize prices throughout the varied providers used inside SageMaker. With this method, you possibly can monitor and monitor respective service prices, both in mixture or specializing in a selected challenge.

Begin taking management of your analytics and ML prices right now. With AWS Billing and Price Administration instruments with SageMaker, you possibly can:

Observe and monitor your service prices
Break down bills by challenge or service
Implement environment friendly again charging mechanisms to the completely different enterprise models or organizations utilizing SageMaker inside your group

For additional studying, confer with Analyzing your prices and utilization with AWS Price Explorer and Processing Knowledge Exports (utilizing Athena).

Concerning the authors

Enrique Salgado Hernández is a Senior Specialist Options Architect at AWS with greater than 10 years of expertise working within the cloud. He focuses on designing and implementing large-scale analytics architectures throughout numerous trade sectors. He’s captivated with working with clients to unravel their issues by supporting them throughout their cloud journey.

Angel Conde Manjon is a Senior EMEA Knowledge & AI PSA, based mostly in Madrid. He beforehand labored on analysis associated to knowledge analytics and AI in various European analysis initiatives. In his present position, Angel helps companions develop companies centered on knowledge and AI.



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular