Deploy the components to your device
Deploy your components with the AWS IoT console or with the AWS CLI.
Deploy your AWS IoT Greengrass components with the AWS IoT console.
-
In the AWS IoT Greengrass console at https://console.aws.amazon.com/iot/
navigation menu, choose Deployments. -
On the Components page, on the Public components tab, choose
aws.greengrass.SageMakerEdgeManager
. -
On the
aws.greengrass.SageMakerEdgeManager
page, choose Deploy. -
From
Add to deployment
, choose one of the following:-
To merge this component to an existing deployment on your target device, choose Add to existing deployment, and then select the deployment that you want to revise.
-
To create a new deployment on your target device, choose Create new deployment. If you have an existing deployment on your device, choosing this step replaces the existing deployment.
-
-
On the Specify target page, do the following:
-
Under Deployment information, enter or modify the friendly name for your deployment.
-
Under Deployment targets, select a target for your deployment, and choose Next. You cannot change the deployment target if you are revising an existing deployment.
-
-
On the Select components page, under My components, choose:
com.
<CUSTOM-COMPONENT-NAME>
aws.greengrass.SageMakerEdgeManager
SagemakerEdgeManager.
<YOUR-PACKAGING-JOB>
-
On the Configure components page, choose com.greengrass.SageMakerEdgeManager, and do the following.
-
Choose Configure component.
-
Under Configuration update, in Configuration to merge, enter the following configuration.
{ "DeviceFleetName": "device-fleet-name", "BucketName": "
bucket-name
" }Replace
with the name of the edge device fleet that you created, and replacedevice-fleet-name
with the name of the Amazon S3 bucket that is associated with your device fleet.bucket-name
-
Choose Confirm, and then choose Next.
-
-
On the Configure advanced settings page, keep the default configuration settings, and choose Next.
-
On the Review page, choose Deploy.
-
Create a
deployment.json
file to define the deployment configuration for your SageMaker Edge Manager components. This file should look like the following example.{ "targetArn":"targetArn", "components": { "aws.greengrass.SageMakerEdgeManager": { "componentVersion": 1.0.0, "configurationUpdate": { "merge": { "DeviceFleetName": "device-fleet-name", "BucketName": "
bucket-name
" } } }, "com.greengrass.SageMakerEdgeManager.ImageClassification": { "componentVersion": 1.0.0, "configurationUpdate": { } }, "com.greengrass.SageMakerEdgeManager.ImageClassification.Model": { "componentVersion": 1.0.0, "configurationUpdate": { } }, } }-
In the
targetArn
field, replace
with the Amazon Resource Name (ARN) of the thing or thing group to target for the deployment, in the following format:targetArn
-
Thing:
arn:aws:iot:
region
:account-id
:thing/thingName
-
Thing group:
arn:aws:iot:
region
:account-id:
thinggroup/thingGroupName
-
-
In the
merge
field, replace
with the name of the edge device fleet that you created, and replacedevice-fleet-name
with the name of the Amazon S3 bucket that is associated with your device fleet.bucket-name
-
Replace the component versions for each component with the latest available version.
-
-
Run the following command to deploy the components on the device:
aws greengrassv2 create-deployment \ --cli-input-json file://path/to/deployment.json
The deployment can take several minutes to complete. In the next step, check the component log to verify that the deployment completed successfully and to view the inference results.
For more information about deploying components to individual devices or groups of devices, see Deploy AWS IoT Greengrass components to devices.