Panorama MLOPs is an extension service from Panorama which help you better manage, monitor and deploy your Panorama APP, with this service, you can easily using Web service to do the following operation
- Create / Delete / View Panorama Data source
- View / Delete Panorama Devices status
- Package and Deploy Panorama APP without writing any code
- Manage your Panorama APP and Model in Panorama MLOps console
If you want to know the details about how to do the above actions, please go to this documents
- Prerequisites
- AWS Account with appropriate permissions to create the related resources
- GitHub Account with appropriate permissions to clone, and install the amplify app
- AWS CLI ( For delete usage ) with output configured as JSON
(pip install awscli --upgrade --user)
- Clone this sample to your App
- Click the button to load the AWS Amplify Console. Amplify Console will build and deploy your backend and frontend in a single workflow. the end to end deployment should take around 20 minutes:
- Connect the Amplify with your source code from the Git repository you just cloned, authorize AWS Amplify to connect to this repository and select a branch.
- Create new environment, branch, and create an IAM role ( with following json snippet )
The IAM permission is not the best practice here, it’s just for sample purpose
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ssm:*",
"codebuild:*",
"states:*",
"iot:*",
"s3:*",
"dynamodb:*",
"lambda:*",
"sagemaker:*",
"panorama:*",
"ecr:*",
"ec2:*"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"iam:CreateInstanceProfile",
"iam:RemoveRoleFromInstanceProfile",
"iam:AddRoleToInstanceProfile",
"iam:PassRole",
"iam:DeleteInstanceProfile",
"iam:AttachRolePolicy",
"iam:CreateRole",
"iam:RemoveRoleFromInstanceProfile"
],
"Resource": "arn:aws:iam::*:role/amplify*"
},
{
"Effect": "Allow",
"Action": [
"iam:CreateInstanceProfile",
"iam:RemoveRoleFromInstanceProfile",
"iam:AddRoleToInstanceProfile",
"iam:PassRole",
"iam:DeleteInstanceProfile",
"iam:AttachRolePolicy",
"iam:CreateRole",
"iam:RemoveRoleFromInstanceProfile"
],
"Resource": "arn:aws:iam::*:instance-profile/amplify*"
}
]
}
version: 1
backend:
phases:
preBuild:
commands:
- ln -fs /usr/local/bin/python3.8 /usr/bin/python3
- ln -fs /usr/local/bin/pip3.8 /usr/bin/pip3
- pip3 install pipenv
- pip3 install virtualenv
build:
commands:
- '# Execute Amplify CLI with the helper script'
- amplifyPush --simple
frontend:
phases:
preBuild:
commands:
- npm install
build:
commands:
- npm run build
artifacts:
# IMPORTANT - Please verify your build output directory
baseDirectory: /build/
files:
- '**/*'
cache:
paths:
- node_modules/**/*
- Click “Next” then “Save and Deploy” and wait for the graph to turn into the following graph
- Prerequisites
- NodeJS with NPM
- AWS Amplify CLI configured for a region where all other services in use are available
(npm install -g @aws-amplify/cli)
- You have already cloned the repo in previous step. Change directory to application root and install dependencies
cd aws-panorama-mlops && npm install
- Select your app in amplify console. All Apps → aws-panorama-mlops → Backend Environment → (extend) Edit backend at the bottom.
- Paste this command into your terminal at the root of your repo (when prompted accept defaults for runtime and source path)
amplify pull --appId <app-id-from-console> --envName <env-name>
? Do you want to use an AWS profile? Yes
? Please choose the profile you want to use default
Amplify AppID found: xxxxxx1234sd. Amplify App name is: aws-appsync-refarch-microservices}
Backend environment master found in Amplify Console app: aws-appsync-refarch-microservices
? Choose your default editor: Visual Studio Code
? Choose the type of app that you're building javascript
Please tell us about your project
? What javascript framework are you using react
? Source Directory Path: src
? Distribution Directory Path: build
? Build Command: npm run-script build
? Start Command: npm run-script start
? Do you plan on modifying this backend? Yes
Successfully pulled backend environment master from the cloud.
Run 'amplify pull' to sync upstream changes.
- Start and work on your front end locally. This will connect to the backend deployed in AWS.
`npm run start`
You can refer the doc for more details
https://aws.amazon.com/premiumsupport/knowledge-center/amplify-delete-application/
There are three ways to delete PPE, you will need to combine two of them to delete the APP in most situation
Using AWS Amplify Console
- Open the AWS Amplify console
- In the left navigation pane, choose the name of the application that you want to delete
After that, if you still see your APP in the Amplify Console, you will need to use AWS CLI and CloudFormation to completely delete the APP
Using CloudFormation
- Go to the console
- Use the filter to find the amplify stack with your environment name in it, for example: if you env name is mainline, search for the amplify stack name with "mainline"
- Click on Delete Button to delete the stack
You will have to use AWS Cli to delete the amplify app thoroughly after using CloudFormation
- Make sure you have the AWS Cli installed
- Open the terminal
- Run the following delete-app AWS CLI command:
Important: Replace your-app-id with your application's App ID. Replace application-region with the AWS Region that your application is in.
aws amplify delete-app --app-id <your-app-id> --region <application-region>