You can monitor and manage applications with the AWS Panorama API.
View applications
To get a list of applications running on an appliance, use the ListApplicationInstances API.
$
aws panorama list-application-instances
"ApplicationInstances": [ { "Name": "aws-panorama-sample", "ApplicationInstanceId": "applicationInstance-ddaxxmpl2z7bg74ywutd7byxuq", "DefaultRuntimeContextDevice": "device-4tafxmplhtmzabv5lsacba4ere", "DefaultRuntimeContextDeviceName": "my-appliance", "Description": "command-line deploy", "Status": "DEPLOYMENT_SUCCEEDED", "HealthStatus": "RUNNING", "StatusDescription": "Application deployed successfully.", "CreatedTime": 1661902051.925, "Arn": "arn:aws:panorama:us-east-2:123456789012:applicationInstance/applicationInstance-ddaxxmpl2z7bg74ywutd7byxuq", "Tags": { "client": "sample" } }, ] }
To get more details about an application instance's nodes, use the ListApplicationInstanceNodeInstances API.
$
aws panorama list-application-instance-node-instances --application-instance-id applicationInstance-ddaxxmpl2z7bg74ywutd7byxuq
{ "NodeInstances": [ { "NodeInstanceId": "code_node", "NodeId": "SAMPLE_CODE-1.0-fd3dxmpl-interface", "PackageName": "SAMPLE_CODE", "PackageVersion": "1.0", "PackagePatchVersion": "fd3dxmpl2bdfa41e6fe1be290a79dd2c29cf014eadf7416d861ce7715ad5e8a8", "NodeName": "interface", "CurrentStatus": "RUNNING" }, { "NodeInstanceId": "camera_node_override", "NodeId": "warehouse-floor-1.0-9eabxmpl-warehouse-floor", "PackageName": "warehouse-floor", "PackageVersion": "1.0", "PackagePatchVersion": "9eabxmple89f0f8b2f2852cca2a6e7971aa38f1629a210d069045e83697e42a7", "NodeName": "warehouse-floor", "CurrentStatus": "RUNNING" }, { "NodeInstanceId": "output_node", "NodeId": "hdmi_data_sink-1.0-9c23xmpl-hdmi0", "PackageName": "hdmi_data_sink", "PackageVersion": "1.0", "PackagePatchVersion": "9c23xmplc4c98b92baea4af676c8b16063d17945a3f6bd8f83f4ff5aa0d0b394", "NodeName": "hdmi0", "CurrentStatus": "RUNNING" }, { "NodeInstanceId": "model_node", "NodeId": "SQUEEZENET_PYTORCH-1.0-5d3cabda-interface", "PackageName": "SQUEEZENET_PYTORCH", "PackageVersion": "1.0", "PackagePatchVersion": "5d3cxmplb7113faa1d130f97f619655d8ca12787c751851a0e155e50eb5e3e96", "NodeName": "interface", "CurrentStatus": "RUNNING" } ] }
Manage camera streams
You can pause and resume camera stream nodes with the SignalApplicationInstanceNodeInstances API.
$
aws panorama signal-application-instance-node-instances --application-instance-id applicationInstance-ddaxxmpl2z7bg74ywutd7byxuq \ --node-signals '[{"NodeInstanceId": "camera_node_override", "Signal": "PAUSE"}]'
{ "ApplicationInstanceId": "applicationInstance-ddaxxmpl2z7bg74ywutd7byxuq" }
In a script, you can get a list of nodes and choose one to pause or resume interactively.
Example pause-camera.sh – usage
my-app$
./pause-camera.sh
Getting nodes... 0: SAMPLE_CODE RUNNING 1: warehouse-floor RUNNING 2: hdmi_data_sink RUNNING 3: entrance-north PAUSED 4: SQUEEZENET_PYTORCH RUNNING Choose a node1
Signalling node warehouse-floor + aws panorama signal-application-instance-node-instances --application-instance-id applicationInstance-r3a7xmplcbmpjqeds7vj4b6pjy --node-signals '[{"NodeInstanceId": "warehouse-floor", "Signal": "PAUSE"}]' { "ApplicationInstanceId": "applicationInstance-r3a7xmplcbmpjqeds7vj4b6pjy" }
By pausing and resuming camera nodes, you can cycle through a larger number of camera streams than can be processed simultaneously. To do this, map multiple camera streams to the same input node in your override manifest.
In the following example, the override manifest maps two camera streams, warehouse-floor
and
entrance-north
to the same input node (camera_node
). The warehouse-floor
stream is active when the application starts and the entrance-north
node waits for a signal to turn
on.
Example override-multicam.json
"nodeGraphOverrides": {
"nodes": [
{
"name": "warehouse-floor",
"interface": "123456789012::warehouse-floor.warehouse-floor",
"launch": "onAppStart"
},
{
"name": "entrance-north",
"interface": "123456789012::entrance-north.entrance-north",
"launch": "onSignal"
},
...
"packages": [
{
"name": "123456789012::warehouse-floor",
"version": "1.0"
},
{
"name": "123456789012::entrance-north",
"version": "1.0"
}
],
"nodeOverrides": [
{
"replace": "camera_node",
"with": [
{
"name": "warehouse-floor"
},
{
"name": "entrance-north"
}
]
}
For details on deploying with the API, see Automate application deployment.