Amazon SageMaker gives a single knowledge and AI improvement atmosphere to find and construct along with your knowledge. This unified platform integrates performance from current AWS Analytics and Synthetic Intelligence and Machine Studying (AI/ML) providers, together with Amazon EMR, AWS Glue, Amazon Athena, Amazon Redshift, and Amazon Bedrock.
Organizations have to effectively handle knowledge property whereas sustaining governance controls of their knowledge marketplaces. Though handbook approval workflows stay essential for delicate datasets and manufacturing methods, there’s an rising want for automated approval processes with much less delicate datasets. On this put up, we present you easy methods to automate subscription request approvals inside SageMaker, accelerating knowledge entry for knowledge shoppers.
Stipulations
For this walkthrough, you have to have the next stipulations:
- An AWS account – If you happen to don’t have an account, you possibly can create one. The account ought to have permission to do the next:
- Create and handle SageMaker domains
- Create and handle IAM roles
- Create and invoke Lambda features
- SageMaker area – For directions to create a site, consult with Create an Amazon SageMaker Unified Studio area – fast setup.
- A demo undertaking – Create a demo undertaking in your SageMaker area. For directions, see Create a undertaking. For this instance, we select All capabilities within the undertaking profile part.
- SageMaker area ID, undertaking ID, and undertaking function ARN – These shall be utilized in later steps to supply permissions for current datasets and sources, and automated subscription approval code. To retrieve this info, go to the Undertaking particulars tab on the undertaking particulars web page on the SageMaker console.
- AWS CLI put in – You will need to have the AWS Command Line Interface (AWS CLI) model 2.11 or later.
- Python put in – You will need to have Python model 3.8 or later.
- IAM permissions – Check in because the consumer with administrative entry
- Lambda permissions – Configure the suitable IAM permissions for the Lambda execution function. The next code is a pattern function used for testing this answer. Earlier than implementing this IAM coverage in your atmosphere, present the values in your particular AWS Area and account ID. Modify them primarily based on the precept of least privilege. To be taught extra about creating Lambda execution roles, consult with Defining Lambda operate permissions with an execution function.
Answer overview
Understanding the subscription and approval workflow in Amazon SageMaker is essential earlier than diving deep into customized workflow answer. After an asset is printed to the SageMaker catalog, knowledge shoppers can uncover property. When a knowledge client discovers property in SageMaker catalog, they request entry to the asset, by submitting a subscription request with enterprise justification and supposed use case. The request enters a pending state and notifies the info producer or asset proprietor for assessment. The information producer evaluates the request primarily based on governance insurance policies, client credentials, and enterprise context. The information producer can settle for, reject, or request further info from the info client. Upon acceptance, SageMaker triggers the AcceptSubscriptionRequest occasion and begins automated entry provisioning. After a subscription is accepted, a subscription fulfilment course of will get kicked off to facilitate entry to the asset, for the info producer. SageMaker integrates deeply with AWS Lake Formation to handle fine-grained permissions. When a subscription is authorized, SageMaker mechanically calls Lake Formation APIs to grant particular database, desk, and column-level permissions to the subscriber’s IAM function. Lake Formation acts because the central permission engine, translating subscription approvals into precise knowledge entry rights with out handbook intervention. The system provisions and updates resource-based insurance policies on knowledge sources. As soon as the provisioning completes, the info client can instantly entry subscribed knowledge via question engines like Athena, Redshift, or EMR, with Lake Formation imposing permissions at question time.
By default, subscription requests to a broadcast asset require handbook approval by a knowledge proprietor. Nevertheless, Amazon SageMaker helps automated approval of subscription requests at asset degree: when publishing a knowledge asset, you possibly can select to not require subscription approval. On this case, all incoming subscription requests to that asset are mechanically authorized. Let’s first define the step-by-step course of for disabling automated approval on the asset degree.
Configure automated approval at asset degree:
To configure automated approval, knowledge producers can comply with the steps under.
- Log in to SageMaker Unified Studio portal as knowledge producer. Navigate to Belongings and choose the goal asset
- Select Belongings → Choose the asset, which you want to configure for automated approval.
- On the asset particulars web page, find Edit Subscription settings in the precise pane.

- Select Edit subsequent to Subscription Required
- Choose Not Required within the dialogue field
- Affirm your choice

Customise SageMaker’s subscription workflow:
Whereas handbook approval workflow stays important for manufacturing environments and delicate knowledge dealing with, organizations search to streamline and automate approvals for lower-risk environments and non-sensitive datasets. To realize this project-level automation, we will improve SageMaker’s native approval workflow via a customized event-driven answer. This answer leverages AWS’s serverless structure, combining utilizing AWS Lambda, Amazon EventBridge guidelines, and Amazon Easy Notification Service (Amazon SNS) to create an automatic approval workflow. This customization permits organizations to keep up governance whereas decreasing administrative overhead and accelerating the event cycle in non-critical environments. The event-driven strategy ensures real-time processing of approval requests, maintains audit trails, and might be configured to use completely different approval guidelines primarily based on undertaking traits and knowledge sensitivity ranges.
The customized workflow consists of the next steps:
- The information client submits a subscription request for a broadcast knowledge asset.
- SageMaker detects the request and generates a subscription occasion, which is mechanically despatched to EventBridge.
- EventBridge triggers the designated Lambda operate.
- The Lambda operate sends an
AcceptSubscriptionRequestAPI name to SageMaker. - The operate additionally sends a notification via Amazon SNS.
- AWS Lake Formation processes the authorized subscription and updates the related entry management lists (ACLs) and permission units.
- Lake Formation grants entry permissions to the info client’s undertaking AWS Id and Entry Administration (IAM) function.
- The information client now has approved entry to the requested knowledge asset and might start working with the subscribed knowledge.
The next diagram illustrates the high-level structure of the answer.

Key advantages
This answer makes use of AWS Lambda and Amazon EventBridge to automate SageMaker subscription requests approvals, delivering the next advantages for organizations and end-users:
- Scalability – Routinely handles excessive volumes of subscription requests
- Price-efficiency – Pay-as-you-go strategy with no idle useful resource prices
- Minimal upkeep – Serverless parts require no infrastructure administration
- Versatile triggering – Helps event-driven, scheduled, and handbook invocation modes
- Audit compliance – Complete logging and traceability via AWS CloudTrail
Step-by-step process
This part outlines the detailed course of for implementing a customized subscription request approval workflow in Amazon SageMaker
Create Lambda operate
Full the next steps to create your Lambda operate:
- On the Lambda console, select Features within the navigation pane.
- Select Create operate.
- Choose Writer from scratch.
- For Perform identify, enter a reputation for the operate.
- For Runtime, select your runtime (for this put up, we use Python model 3.9 or later).
- Select Create operate.

- On the Lambda operate web page, select the Configuration tab after which select Permissions.
- Observe the execution function to make use of when configuring the SageMaker undertaking.

Create SNS matter
For this answer, we create SNS matter. Full the next steps to create the SNS matter for automated approvals:
- On the Amazon SNS console, select Subjects within the navigation pane.
- Select Create matter.
- For Kind, choose Commonplace.
- For Identify, enter a reputation for the subject.
- Select Create matter.

- On the SNS matter particulars web page, word the SNS matter Amazon Useful resource Identify (ARN) to make use of later within the Lambda operate.

- On Subscription tab, select Create Subscription.
- For Protocol, select E mail.
- For Endpoint, enter e mail deal with of Knowledge shoppers.

Create EventBridge rule
Full the next steps to create an EventBridge rule to seize subscription request occasions:
- On the EventBridge console, select Guidelines within the navigation pane.
- Select Create rule.
- For Identify, enter a reputation for the rule.
- For Rule kind, choose Rule with occasion sample.
This selection allows the automated subscription approval workflow to be triggered when a subscription request is initiated. Alternatively, you possibly can choose Schedule to schedule the rule to set off frequently. Seek advice from Making a rule that runs on a schedule in Amazon EventBridge to be taught extra. - Select Subsequent.

- For Occasion supply, choose AWS occasions or EventBridge associate occasions.
- For Creation methodology, choose Use sample type
- For Occasion supply, choose AWS providers
- For AWS service, choose DataZone.
- For Occasion kind, choose Subscription Request Created.

- Configure your goal to route occasions to each the Lambda operate and SNS matter.
- Select Subsequent.

- For this put up, skip configuring tags and select Subsequent.

- Assessment the settings and select Create rule.
Configure automation workflow
Full the next steps to configure the automation workflow:
- On the Lambda console, go to the operate you created.
- Configure the EventBridge rule to set off the Lambda operate
- Configure the vacation spot as SNS matter for occasion notification.

Configure code in Lambda operate
Full the next steps to configure your Lambda operate:
- On the Lambda console, go to the operate you created.
- Add the next code to your operate. Present the area ID, undertaking ID, and SNS matter ARN that you just famous earlier.
- Select Take a look at to check the Lambda operate code. To be taught extra about testing Lambda code, consult with Testing Lambda features within the console.
- Select Deploy to deploy the code.
Configure Lambda and undertaking execution roles in SageMaker
Full the next steps:
- In SageMaker Unified Studio, go to your publishing undertaking.
- Select Members within the navigation pane.
- Select Add members.
- Add the Lambda execution function and undertaking execution roles as Contributor.

Take a look at the answer
Full the next steps to check the answer:
- In SageMaker Unified Studio, navigate to the info catalog and select Subscribe on the configured asset to provoke a subscription request.

- Select Subscription requests within the navigation pane to view the outgoing requests and select the Permitted tab to confirm automated approval.

- Select View subscription to verify the approver seems because the Lambda execution function with “Auto-approved by Lambda” as the rationale.

- On the CloudTrail console, select Occasion historical past to view the occasion you created and assessment the automated approval audit path.

Clear up
To keep away from incurring future fees, clear up the sources you created throughout this walkthrough. The next steps use the AWS Administration Console, however you can even use the AWS CLI.
- Delete the SageMaker area. To make use of the AWS CLI, run the next instructions:
- Delete the SNS matters. To make use of the AWS CLI, run the next command:
- Delete the Lambda operate. To make use of the AWS CLI, run the next command:
Conclusion
Combining an event-driven structure with SageMaker creates an automatic, cost-effective answer for knowledge governance challenges. This serverless strategy mechanically handles knowledge entry requests whereas sustaining compliance, so organizations can scale effectively as their knowledge grows. The answer mentioned on this put up may help knowledge groups entry insights sooner with minimal operational prices, making it a wonderful alternative for companies that want fast, compliant knowledge entry whereas maintaining their methods lean and environment friendly.
To be taught extra, go to the Amazon SageMaker Unified Studio web page.
In regards to the authors
