Sample applications, scripts, and templates
The GitHub repository for this guide provides sample applications, scripts, and templates for AWS Panorama devices. Use these samples to learn best practices and automate development workflows.
Sample applications
Sample applications demonstrate use of AWS Panorama features and common computer vision tasks. These sample applications include scripts and templates that automate setup and deployment. With minimal configuration, you can deploy and update applications from the command line.
-
aws-panorama-sample
– Basic computer vision with a classification model. Use the AWS SDK for Python (Boto) to upload metrics to CloudWatch, instrument preprocessing and inference methods, and configure logging. -
debug-server
– Open inbound ports on the device and forward traffic to an application code container. Use multithreading to run application code, an HTTP server, and an HTTP client simultaneously. -
custom-model
– Export models from code and compile with SageMaker Neo to test compatibility with the AWS Panorama Appliance. Build locally in a Python development, in a Docker container, or on an Amazon EC2 instance. Export and compile all built-in application models in Keras for a specific TensorFlow or Python version.
For more sample applications, also visit the aws-panorama-samples
Utility scripts
The scripts in the util-scripts
directory manage AWS Panorama resources or automate development
workflows.
-
provision-device.sh
– Provision a device. -
check-updates.sh
– Check for and apply appliance software updates. -
reboot-device.sh
– Reboot a device. -
register-camera.sh
– Register a camera. -
deregister-camera.sh
– Delete a camera node. -
view-logs.sh
– View logs for an application instance. -
pause-camera.sh
– Pause or resume a camera stream. -
push.sh
– Build, upload, and deploy an application. -
rename-package.sh
– Rename a node package. Updates directory names, configuration files, and the application manifest. -
samplify.sh
– Replace your account ID with an example account ID, and restore backup configurations to remove local configuration. -
update-model-config.sh
– Re-add the model to the application after updating the descriptor file. -
cleanup-patches.sh
– Deregister old patch versions and delete their manifests from Amazon S3.
For usage details, see the README
AWS CloudFormation templates
Use the AWS CloudFormation templates in the cloudformation-templates
directory to create resources for AWS Panorama
applications.
-
alarm-application.yml
– Create an alarm that monitors an application for errors. If the application instance raises errors or stops running for 5 minutes, the alarm sends a notification email. -
alarm-device.yml
– Create an alarm that monitors a device's connectivity. If the device stops sending metrics for 5 minutes, the alarm sends a notification email. -
application-role.yml
– Create an application role. The role includes permission to send metrics to CloudWatch. Add permissions to the policy statement for other API operations that your application uses. -
vpc-appliance.yml
– Create a VPC with private subnet service access for the AWS Panorama Appliance. To connect the appliance to a VPC, use AWS Direct Connect or AWS Site-to-Site VPN. -
vpc-endpoint.yml
– Create a VPC with private subnet service access to the AWS Panorama service. Resources inside of the VPC can connect to AWS Panorama to monitor and manage AWS Panorama resources without connecting to the internet.
The create-stack.sh
script in this directory creates AWS CloudFormation stacks. It takes a variable number of
arguments. The first argument is the name of the template, and the remaining arguments are overrides for
parameters in the template.
For example, the following command creates an application role.
$
./create-stack.sh application-role
More samples and tools
The aws-panorama-samples
-
Applications
– Sample applications for various model architectures and use cases. -
Camera stream validation
– Validate camera streams. -
PanoJupyter
– Run JupyterLab on an AWS Panorama Appliance. -
Sideloading
– Update application code without building or deploying an application container.
The AWS community has also developed tools and guidance for AWS Panorama. Check out the following open source projects on GitHub.
-
cookiecutter-panorama
– A Cookiecutter template for AWS Panorama applications. -
backpack
– Python modules for accessing runtime environment details, profiling, and additional video output options.