2021/06/10 - Amazon SageMaker Service - 6 updated api methods
Changes Using SageMaker Edge Manager with AWS IoT Greengrass v2 simplifies accessing, maintaining, and deploying models to your devices. You can now create deployable IoT Greengrass components during edge packaging jobs. You can choose to create a device fleet with or without creating an AWS IoT role alias.
{'EnableIotRoleAlias': 'boolean', 'OutputConfig': {'PresetDeploymentConfig': 'string', 'PresetDeploymentType': 'GreengrassV2Component'}}
Creates a device fleet.
See also: AWS API Documentation
Request Syntax
client.create_device_fleet( DeviceFleetName='string', RoleArn='string', Description='string', OutputConfig={ 'S3OutputLocation': 'string', 'KmsKeyId': 'string', 'PresetDeploymentType': 'GreengrassV2Component', 'PresetDeploymentConfig': 'string' }, Tags=[ { 'Key': 'string', 'Value': 'string' }, ], EnableIotRoleAlias=True|False )
string
[REQUIRED]
The name of the fleet that the device belongs to.
string
The Amazon Resource Name (ARN) that has access to AWS Internet of Things (IoT).
string
A description of the fleet.
dict
[REQUIRED]
The output configuration for storing sample data collected by the fleet.
S3OutputLocation (string) -- [REQUIRED]
The Amazon Simple Storage (S3) bucker URI.
KmsKeyId (string) --
The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt data on the storage volume after compilation job. If you don't provide a KMS key ID, Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account.
PresetDeploymentType (string) --
The deployment type SageMaker Edge Manager will create. Currently only supports AWS IoT Greengrass Version 2 components.
PresetDeploymentConfig (string) --
The configuration used to create deployment artifacts. Specify configuration options with a JSON string. The available configuration options for each type are:
ComponentName (optional) - Name of the GreenGrass V2 component. If not specified, the default name generated consists of "SagemakerEdgeManager" and the name of your SageMaker Edge Manager packaging job.
ComponentDescription (optional) - Description of the component.
ComponentVersion (optional) - The version of the component.
Note
AWS IoT Greengrass uses semantic versions for components. Semantic versions follow a*major.minor.patch* number system. For example, version 1.0.0 represents the first major release for a component. For more information, see the semantic version specification.
PlatformOS (optional) - The name of the operating system for the platform. Supported platforms include Windows and Linux.
PlatformArchitecture (optional) - The processor architecture for the platform. Supported architectures Windows include: Windows32_x86, Windows64_x64. Supported architectures for Linux include: Linux x86_64, Linux ARMV8.
list
Creates tags for the specified fleet.
(dict) --
A tag object that consists of a key and an optional value, used to manage metadata for Amazon SageMaker AWS resources.
You can add tags to notebook instances, training jobs, hyperparameter tuning jobs, batch transform jobs, models, labeling jobs, work teams, endpoint configurations, and endpoints. For more information on adding tags to Amazon SageMaker resources, see AddTags.
For more information on adding metadata to your AWS resources with tagging, see Tagging AWS resources. For advice on best practices for managing AWS resources with tagging, see Tagging Best Practices: Implement an Effective AWS Resource Tagging Strategy.
Key (string) -- [REQUIRED]
The tag key. Tag keys must be unique per resource.
Value (string) -- [REQUIRED]
The tag value.
boolean
Whether to create an AWS IoT Role Alias during device fleet creation. The name of the role alias generated will match this pattern: "SageMakerEdge-{DeviceFleetName}".
For example, if your device fleet is called "demo-fleet", the name of the role alias will be "SageMakerEdge-demo-fleet".
None
{'OutputConfig': {'PresetDeploymentConfig': 'string', 'PresetDeploymentType': 'GreengrassV2Component'}}
Starts a SageMaker Edge Manager model packaging job. Edge Manager will use the model artifacts from the Amazon Simple Storage Service bucket that you specify. After the model has been packaged, Amazon SageMaker saves the resulting artifacts to an S3 bucket that you specify.
See also: AWS API Documentation
Request Syntax
client.create_edge_packaging_job( EdgePackagingJobName='string', CompilationJobName='string', ModelName='string', ModelVersion='string', RoleArn='string', OutputConfig={ 'S3OutputLocation': 'string', 'KmsKeyId': 'string', 'PresetDeploymentType': 'GreengrassV2Component', 'PresetDeploymentConfig': 'string' }, ResourceKey='string', Tags=[ { 'Key': 'string', 'Value': 'string' }, ] )
string
[REQUIRED]
The name of the edge packaging job.
string
[REQUIRED]
The name of the SageMaker Neo compilation job that will be used to locate model artifacts for packaging.
string
[REQUIRED]
The name of the model.
string
[REQUIRED]
The version of the model.
string
[REQUIRED]
The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to download and upload the model, and to contact SageMaker Neo.
dict
[REQUIRED]
Provides information about the output location for the packaged model.
S3OutputLocation (string) -- [REQUIRED]
The Amazon Simple Storage (S3) bucker URI.
KmsKeyId (string) --
The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt data on the storage volume after compilation job. If you don't provide a KMS key ID, Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account.
PresetDeploymentType (string) --
The deployment type SageMaker Edge Manager will create. Currently only supports AWS IoT Greengrass Version 2 components.
PresetDeploymentConfig (string) --
The configuration used to create deployment artifacts. Specify configuration options with a JSON string. The available configuration options for each type are:
ComponentName (optional) - Name of the GreenGrass V2 component. If not specified, the default name generated consists of "SagemakerEdgeManager" and the name of your SageMaker Edge Manager packaging job.
ComponentDescription (optional) - Description of the component.
ComponentVersion (optional) - The version of the component.
Note
AWS IoT Greengrass uses semantic versions for components. Semantic versions follow a*major.minor.patch* number system. For example, version 1.0.0 represents the first major release for a component. For more information, see the semantic version specification.
PlatformOS (optional) - The name of the operating system for the platform. Supported platforms include Windows and Linux.
PlatformArchitecture (optional) - The processor architecture for the platform. Supported architectures Windows include: Windows32_x86, Windows64_x64. Supported architectures for Linux include: Linux x86_64, Linux ARMV8.
string
The CMK to use when encrypting the EBS volume the edge packaging job runs on.
list
Creates tags for the packaging job.
(dict) --
A tag object that consists of a key and an optional value, used to manage metadata for Amazon SageMaker AWS resources.
You can add tags to notebook instances, training jobs, hyperparameter tuning jobs, batch transform jobs, models, labeling jobs, work teams, endpoint configurations, and endpoints. For more information on adding tags to Amazon SageMaker resources, see AddTags.
For more information on adding metadata to your AWS resources with tagging, see Tagging AWS resources. For advice on best practices for managing AWS resources with tagging, see Tagging Best Practices: Implement an Effective AWS Resource Tagging Strategy.
Key (string) -- [REQUIRED]
The tag key. Tag keys must be unique per resource.
Value (string) -- [REQUIRED]
The tag value.
None
{'OutputConfig': {'PresetDeploymentConfig': 'string', 'PresetDeploymentType': 'GreengrassV2Component'}}
A description of the fleet the device belongs to.
See also: AWS API Documentation
Request Syntax
client.describe_device_fleet( DeviceFleetName='string' )
string
[REQUIRED]
The name of the fleet.
dict
Response Syntax
{ 'DeviceFleetName': 'string', 'DeviceFleetArn': 'string', 'OutputConfig': { 'S3OutputLocation': 'string', 'KmsKeyId': 'string', 'PresetDeploymentType': 'GreengrassV2Component', 'PresetDeploymentConfig': 'string' }, 'Description': 'string', 'CreationTime': datetime(2015, 1, 1), 'LastModifiedTime': datetime(2015, 1, 1), 'RoleArn': 'string', 'IotRoleAlias': 'string' }
Response Structure
(dict) --
DeviceFleetName (string) --
The name of the fleet.
DeviceFleetArn (string) --
The The Amazon Resource Name (ARN) of the fleet.
OutputConfig (dict) --
The output configuration for storing sampled data.
S3OutputLocation (string) --
The Amazon Simple Storage (S3) bucker URI.
KmsKeyId (string) --
The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt data on the storage volume after compilation job. If you don't provide a KMS key ID, Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account.
PresetDeploymentType (string) --
The deployment type SageMaker Edge Manager will create. Currently only supports AWS IoT Greengrass Version 2 components.
PresetDeploymentConfig (string) --
The configuration used to create deployment artifacts. Specify configuration options with a JSON string. The available configuration options for each type are:
ComponentName (optional) - Name of the GreenGrass V2 component. If not specified, the default name generated consists of "SagemakerEdgeManager" and the name of your SageMaker Edge Manager packaging job.
ComponentDescription (optional) - Description of the component.
ComponentVersion (optional) - The version of the component.
Note
AWS IoT Greengrass uses semantic versions for components. Semantic versions follow a*major.minor.patch* number system. For example, version 1.0.0 represents the first major release for a component. For more information, see the semantic version specification.
PlatformOS (optional) - The name of the operating system for the platform. Supported platforms include Windows and Linux.
PlatformArchitecture (optional) - The processor architecture for the platform. Supported architectures Windows include: Windows32_x86, Windows64_x64. Supported architectures for Linux include: Linux x86_64, Linux ARMV8.
Description (string) --
A description of the fleet.
CreationTime (datetime) --
Timestamp of when the device fleet was created.
LastModifiedTime (datetime) --
Timestamp of when the device fleet was last updated.
RoleArn (string) --
The Amazon Resource Name (ARN) that has access to AWS Internet of Things (IoT).
IotRoleAlias (string) --
The Amazon Resource Name (ARN) alias created in AWS Internet of Things (IoT).
{'OutputConfig': {'PresetDeploymentConfig': 'string', 'PresetDeploymentType': 'GreengrassV2Component'}, 'PresetDeploymentOutput': {'Artifact': 'string', 'Status': 'COMPLETED | FAILED', 'StatusMessage': 'string', 'Type': 'GreengrassV2Component'}}
A description of edge packaging jobs.
See also: AWS API Documentation
Request Syntax
client.describe_edge_packaging_job( EdgePackagingJobName='string' )
string
[REQUIRED]
The name of the edge packaging job.
dict
Response Syntax
{ 'EdgePackagingJobArn': 'string', 'EdgePackagingJobName': 'string', 'CompilationJobName': 'string', 'ModelName': 'string', 'ModelVersion': 'string', 'RoleArn': 'string', 'OutputConfig': { 'S3OutputLocation': 'string', 'KmsKeyId': 'string', 'PresetDeploymentType': 'GreengrassV2Component', 'PresetDeploymentConfig': 'string' }, 'ResourceKey': 'string', 'EdgePackagingJobStatus': 'STARTING'|'INPROGRESS'|'COMPLETED'|'FAILED'|'STOPPING'|'STOPPED', 'EdgePackagingJobStatusMessage': 'string', 'CreationTime': datetime(2015, 1, 1), 'LastModifiedTime': datetime(2015, 1, 1), 'ModelArtifact': 'string', 'ModelSignature': 'string', 'PresetDeploymentOutput': { 'Type': 'GreengrassV2Component', 'Artifact': 'string', 'Status': 'COMPLETED'|'FAILED', 'StatusMessage': 'string' } }
Response Structure
(dict) --
EdgePackagingJobArn (string) --
The Amazon Resource Name (ARN) of the edge packaging job.
EdgePackagingJobName (string) --
The name of the edge packaging job.
CompilationJobName (string) --
The name of the SageMaker Neo compilation job that is used to locate model artifacts that are being packaged.
ModelName (string) --
The name of the model.
ModelVersion (string) --
The version of the model.
RoleArn (string) --
The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to download and upload the model, and to contact Neo.
OutputConfig (dict) --
The output configuration for the edge packaging job.
S3OutputLocation (string) --
The Amazon Simple Storage (S3) bucker URI.
KmsKeyId (string) --
The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt data on the storage volume after compilation job. If you don't provide a KMS key ID, Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account.
PresetDeploymentType (string) --
The deployment type SageMaker Edge Manager will create. Currently only supports AWS IoT Greengrass Version 2 components.
PresetDeploymentConfig (string) --
The configuration used to create deployment artifacts. Specify configuration options with a JSON string. The available configuration options for each type are:
ComponentName (optional) - Name of the GreenGrass V2 component. If not specified, the default name generated consists of "SagemakerEdgeManager" and the name of your SageMaker Edge Manager packaging job.
ComponentDescription (optional) - Description of the component.
ComponentVersion (optional) - The version of the component.
Note
AWS IoT Greengrass uses semantic versions for components. Semantic versions follow a*major.minor.patch* number system. For example, version 1.0.0 represents the first major release for a component. For more information, see the semantic version specification.
PlatformOS (optional) - The name of the operating system for the platform. Supported platforms include Windows and Linux.
PlatformArchitecture (optional) - The processor architecture for the platform. Supported architectures Windows include: Windows32_x86, Windows64_x64. Supported architectures for Linux include: Linux x86_64, Linux ARMV8.
ResourceKey (string) --
The CMK to use when encrypting the EBS volume the job run on.
EdgePackagingJobStatus (string) --
The current status of the packaging job.
EdgePackagingJobStatusMessage (string) --
Returns a message describing the job status and error messages.
CreationTime (datetime) --
The timestamp of when the packaging job was created.
LastModifiedTime (datetime) --
The timestamp of when the job was last updated.
ModelArtifact (string) --
The Amazon Simple Storage (S3) URI where model artifacts ares stored.
ModelSignature (string) --
The signature document of files in the model artifact.
PresetDeploymentOutput (dict) --
The output of a SageMaker Edge Manager deployable resource.
Type (string) --
The deployment type created by SageMaker Edge Manager. Currently only supports AWS IoT Greengrass Version 2 components.
Artifact (string) --
The Amazon Resource Name (ARN) of the generated deployable resource.
Status (string) --
The status of the deployable resource.
StatusMessage (string) --
Returns a message describing the status of the deployed resource.
{'OutputConfig': {'PresetDeploymentConfig': 'string', 'PresetDeploymentType': 'GreengrassV2Component'}}
Describes a fleet.
See also: AWS API Documentation
Request Syntax
client.get_device_fleet_report( DeviceFleetName='string' )
string
[REQUIRED]
The name of the fleet.
dict
Response Syntax
{ 'DeviceFleetArn': 'string', 'DeviceFleetName': 'string', 'OutputConfig': { 'S3OutputLocation': 'string', 'KmsKeyId': 'string', 'PresetDeploymentType': 'GreengrassV2Component', 'PresetDeploymentConfig': 'string' }, 'Description': 'string', 'ReportGenerated': datetime(2015, 1, 1), 'DeviceStats': { 'ConnectedDeviceCount': 123, 'RegisteredDeviceCount': 123 }, 'AgentVersions': [ { 'Version': 'string', 'AgentCount': 123 }, ], 'ModelStats': [ { 'ModelName': 'string', 'ModelVersion': 'string', 'OfflineDeviceCount': 123, 'ConnectedDeviceCount': 123, 'ActiveDeviceCount': 123, 'SamplingDeviceCount': 123 }, ] }
Response Structure
(dict) --
DeviceFleetArn (string) --
The Amazon Resource Name (ARN) of the device.
DeviceFleetName (string) --
The name of the fleet.
OutputConfig (dict) --
The output configuration for storing sample data collected by the fleet.
S3OutputLocation (string) --
The Amazon Simple Storage (S3) bucker URI.
KmsKeyId (string) --
The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt data on the storage volume after compilation job. If you don't provide a KMS key ID, Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account.
PresetDeploymentType (string) --
The deployment type SageMaker Edge Manager will create. Currently only supports AWS IoT Greengrass Version 2 components.
PresetDeploymentConfig (string) --
The configuration used to create deployment artifacts. Specify configuration options with a JSON string. The available configuration options for each type are:
ComponentName (optional) - Name of the GreenGrass V2 component. If not specified, the default name generated consists of "SagemakerEdgeManager" and the name of your SageMaker Edge Manager packaging job.
ComponentDescription (optional) - Description of the component.
ComponentVersion (optional) - The version of the component.
Note
AWS IoT Greengrass uses semantic versions for components. Semantic versions follow a*major.minor.patch* number system. For example, version 1.0.0 represents the first major release for a component. For more information, see the semantic version specification.
PlatformOS (optional) - The name of the operating system for the platform. Supported platforms include Windows and Linux.
PlatformArchitecture (optional) - The processor architecture for the platform. Supported architectures Windows include: Windows32_x86, Windows64_x64. Supported architectures for Linux include: Linux x86_64, Linux ARMV8.
Description (string) --
Description of the fleet.
ReportGenerated (datetime) --
Timestamp of when the report was generated.
DeviceStats (dict) --
Status of devices.
ConnectedDeviceCount (integer) --
The number of devices connected with a heartbeat.
RegisteredDeviceCount (integer) --
The number of registered devices.
AgentVersions (list) --
The versions of Edge Manager agent deployed on the fleet.
(dict) --
Edge Manager agent version.
Version (string) --
Version of the agent.
AgentCount (integer) --
The number of Edge Manager agents.
ModelStats (list) --
Status of model on device.
(dict) --
Status of edge devices with this model.
ModelName (string) --
The name of the model.
ModelVersion (string) --
The model version.
OfflineDeviceCount (integer) --
The number of devices that have this model version and do not have a heart beat.
ConnectedDeviceCount (integer) --
The number of devices that have this model version and have a heart beat.
ActiveDeviceCount (integer) --
The number of devices that have this model version, a heart beat, and are currently running.
SamplingDeviceCount (integer) --
The number of devices with this model version and are producing sample data.
{'EnableIotRoleAlias': 'boolean', 'OutputConfig': {'PresetDeploymentConfig': 'string', 'PresetDeploymentType': 'GreengrassV2Component'}}
Updates a fleet of devices.
See also: AWS API Documentation
Request Syntax
client.update_device_fleet( DeviceFleetName='string', RoleArn='string', Description='string', OutputConfig={ 'S3OutputLocation': 'string', 'KmsKeyId': 'string', 'PresetDeploymentType': 'GreengrassV2Component', 'PresetDeploymentConfig': 'string' }, EnableIotRoleAlias=True|False )
string
[REQUIRED]
The name of the fleet.
string
The Amazon Resource Name (ARN) of the device.
string
Description of the fleet.
dict
[REQUIRED]
Output configuration for storing sample data collected by the fleet.
S3OutputLocation (string) -- [REQUIRED]
The Amazon Simple Storage (S3) bucker URI.
KmsKeyId (string) --
The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt data on the storage volume after compilation job. If you don't provide a KMS key ID, Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account.
PresetDeploymentType (string) --
The deployment type SageMaker Edge Manager will create. Currently only supports AWS IoT Greengrass Version 2 components.
PresetDeploymentConfig (string) --
The configuration used to create deployment artifacts. Specify configuration options with a JSON string. The available configuration options for each type are:
ComponentName (optional) - Name of the GreenGrass V2 component. If not specified, the default name generated consists of "SagemakerEdgeManager" and the name of your SageMaker Edge Manager packaging job.
ComponentDescription (optional) - Description of the component.
ComponentVersion (optional) - The version of the component.
Note
AWS IoT Greengrass uses semantic versions for components. Semantic versions follow a*major.minor.patch* number system. For example, version 1.0.0 represents the first major release for a component. For more information, see the semantic version specification.
PlatformOS (optional) - The name of the operating system for the platform. Supported platforms include Windows and Linux.
PlatformArchitecture (optional) - The processor architecture for the platform. Supported architectures Windows include: Windows32_x86, Windows64_x64. Supported architectures for Linux include: Linux x86_64, Linux ARMV8.
boolean
Whether to create an AWS IoT Role Alias during device fleet creation. The name of the role alias generated will match this pattern: "SageMakerEdge-{DeviceFleetName}".
For example, if your device fleet is called "demo-fleet", the name of the role alias will be "SageMakerEdge-demo-fleet".
None