Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@cdklabs/cdk-aws-sagemaker-role-manager
Advanced tools
Create roles and policies for ML Activities and ML Personas
import { Stack } from 'aws-cdk-lib';
import { Activity } from '@cdklabs/cdk-aws-sagemaker-role-manager';
const stack = new Stack(app, 'CdkRoleManagerDemo');
const activity = Activity.manageJobs(stack, 'id1', {
rolesToPass: [iam.Role.fromRoleName('Enter Name')],
subnets: [ec2.Subnet.fromSubnetId('Enter Id')],
securityGroups: [ec2.SecurityGroup.fromSecurityGroupId('Enter Id')],
dataKeys: [kms.Key.fromKeyArn('Enter Key Arn')],
volumeKeys: [kms.Key.fromKeyArn('Enter Key Arn')],
});
activity.createRole(stack, 'role id', 'Enter Name');
import { Stack } from 'aws-cdk-lib';
import { Activity } from '@cdklabs/cdk-aws-sagemaker-role-manager';
const stack = new Stack(app, 'CdkRoleManagerDemo');
const activity = Activity.manageJobs(this, 'id1', {
rolesToPass: [iam.Role.fromRoleName('Enter Name')],
});
activity.createRole(this, 'role id', 'Enter Name', 'Enter Description');
import { Stack } from 'aws-cdk-lib';
import { Activity, Persona } from '@cdklabs/cdk-aws-sagemaker-role-manager';
const stack = new Stack(app, 'CdkRoleManagerDemo');
let persona = new Persona(this, 'persona id', {
activities: [
Activity.useStudioApps(),
Activity.manageJobs(this, 'id1', {rolesToPass: [iam.Role.fromRoleName('Enter Name')]}),
Activity.manageModels(this, 'id2', {rolesToPass: [iam.Role.fromRoleName('Enter Name')]}),
Activity.manageExperiments(this, 'id3', {}),
Activity.searchExperiments(this, 'id4', {}),
Activity.accessBuckets(this, 'id5', {buckets: [s3.S3Bucket.fromBucketName('Enter Name')]})
],
subnets: [ec2.Subnet.fromSubnetId('Enter Id')],
securityGroups: [ec2.SecurityGroup.fromSecurityGroupId('Enter Id')],
dataKeys: [kms.Key.fromKeyArn('Enter Key Arn')],
volumeKeys: [kms.Key.fromKeyArn('Enter Key Arn')],
});
persona.createRole(this, 'role id', 'Enter Name', 'Enter Description');
import { Stack } from 'aws-cdk-lib';
import { Activity, Persona } from '@cdklabs/cdk-aws-sagemaker-role-manager';
const stack = new Stack(app, 'CdkRoleManagerDemo');
// Please see below how to create the Data Scientist ML Persona using its ML Activities.
// You can update the following list with changes matching your usecase.
let persona = new Persona(this, 'persona id', {
activities: [
Activity.useStudioApps(),
Activity.manageJobs(this, 'id1', {rolesToPass: [iam.Role.fromRoleName('Enter Name')]}),
Activity.manageModels(this, 'id2', {rolesToPass: [iam.Role.fromRoleName('Enter Name')]}),
Activity.manageExperiments(this, 'id3', {}),
Activity.searchExperiments(this, 'id4', {}),
Activity.accessBuckets(this, 'id5', {buckets: [s3.S3Bucket.fromBucketName('Enter Name')]})
],
});
// We can create a role with Data Scientist persona permissions
const role = persona.createRole(this, 'role id', 'Enter Name', 'Enter Description');
import { Stack } from 'aws-cdk-lib';
import { Activity, Persona } from '@cdklabs/cdk-aws-sagemaker-role-manager';
const stack = new Stack(app, 'CdkRoleManagerDemo');
let persona = new Persona(this, 'persona id', {
activities: [
Activity.useStudioApps(this, 'id1', {}),
Activity.manageModels(this, 'id2', {rolesToPass: [iam.Role.fromRoleName('Enter Name')]}),
Activity.manageEndpoints(this, 'id3',{rolesToPass: [iam.Role.fromRoleName('Enter Name')]}),
Activity.managePipelines(this, 'id4', {rolesToPass: [iam.Role.fromRoleName('Enter Name')]}),
Activity.searchExperiments(this, 'id5', {})
],
subnets: [ec2.Subnet.fromSubnetId('Enter Id')],
securityGroups: [ec2.SecurityGroup.fromSecurityGroupId('Enter Id')],
dataKeys: [kms.Key.fromKeyArn('Enter Key Arn')],
volumeKeys: [kms.Key.fromKeyArn('Enter Key Arn')],
});
const role = persona.createRole(this, 'role id', 'Enter Name', 'Enter Description');
import { Stack } from 'aws-cdk-lib';
import { Activity, Persona } from '@cdklabs/cdk-aws-sagemaker-role-manager';
const stack = new Stack(app, 'CdkRoleManagerDemo');
let persona = new Persona(this, 'persona id', {
activities: [
Activity.useStudioApps(this, 'id1', {}),
Activity.manageModels(this, 'id2', {rolesToPass: [iam.Role.fromRoleName('Enter Name')]}),
Activity.manageEndpoints(this, 'id3',{rolesToPass: [iam.Role.fromRoleName('Enter Name')]}),
Activity.managePipelines(this, 'id4', {rolesToPass: [iam.Role.fromRoleName('Enter Name')]}),
Activity.searchExperiments(this, 'id5', {})
],
});
const role = persona.createRole(this, 'role id', 'Enter Name', 'Enter Description');
ML Activity Name | ML Activity Interface | ML Activity Description | ML Activity Required Parameters |
---|---|---|---|
Access Required AWS Services | Activity.accessAwsServices() | Permissions to access S3, ECR, Cloudwatch and EC2. Required for execution roles for jobs and endpoints. | ecrRepositories, s3Buckets |
Run Studio Applications | Activity.runStudioApps() | Permissions to operate within a Studio environment. Required for domain and user-profile execution roles. | rolesToPass |
Manage ML Jobs | Activity.manageJobs() | Permissions to manage SageMaker jobs across their lifecycles. | rolesToPass |
Manage Models | Activity.manageModels() | Permissions to manage SageMaker models and Model Registry. | rolesToPass |
Manage Endpoints | Activity.manageEndpoints() | Permissions to manage SageMaker Endpoint deployments and updates. | No required parameters |
Manage Pipelines | Activity.managePipelines() | Permissions to manage SageMaker Pipelines and pipeline executions. | rolesToPass |
Manage Experiments | Activity.manageExperiments() | Permissions to manage experiments and trials. | No required parameters |
Search and visualize experiments | Activity.visualizeExperiments() | Permissions to audit, query lineage and visualize experiments. | No required parameters |
Manage Model Monitoring | Activity.monitorModels() | Permissions to manage monitoring schedules for SageMaker Model Monitor. | rolesToPass |
S3 Full Access | Activity.accessS3AllResources() | Permissions to perform all S3 operations | No required parameters |
S3 Bucket Access | Activity.accessS3Buckets() | Permissions to perform operations on specified buckets. | s3Buckets |
Query Athena Workgroups | Activity.queryAthenaGroups() | Permissions to execute and manage Amazon Athena queries. | athenaWorkgroupNames |
Manage Glue Tables | Activity.manageGlueTables() | Permissions to create and manage Glue tables for SageMaker Feature Store and Data Wrangler. | s3Buckets, glueDatabaseNames |
See CONTRIBUTING for more information.
This project is licensed under the Apache-2.0 License.
FAQs
Create roles and policies for ML Activities and ML Personas
We found that @cdklabs/cdk-aws-sagemaker-role-manager demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.