Amplify CLI XR Plugin
raw JSON →The `amplify-category-xr` package, currently at version `3.4.4` as per the provided metadata, extends the AWS Amplify Command Line Interface (CLI) to allow developers to provision and manage cloud resources for Extended Reality (XR) applications. This typically included services for AR/VR/MR capabilities within Amplify-powered backends. As part of the broader AWS Amplify CLI monorepo, its release cadence historically aligned with frequent updates for bug fixes and minor features across the CLI. However, this plugin's core functionality is now deprecated as its underlying dependency, Amazon Sumerian, is no longer accepting new customers, and existing Sumerian scenes were slated to be unavailable after February 21, 2023. Therefore, while the CLI plugin exists, it no longer provisions functional resources. Its original key differentiator was abstracting complex AWS service configurations for XR, integrating with other Amplify categories like Auth and Storage.
Common errors
error Command 'xr' not found ↓
@aws-amplify/cli is installed globally (npm install -g @aws-amplify/cli). If the issue persists, try reinstalling the CLI. Note that even if the command is found, it's deprecated. error Error: User is not authorized to perform: sumerian:CreateScene on resource: arn:aws:sumerian:... ↓
error ResourceNotFoundException: The requested scene could not be found. ↓
amplify push was run successfully. Given the deprecation of Amazon Sumerian, this error is now the expected behavior for any XR resource. Warnings
breaking The AWS Amplify XR features, and by extension this CLI plugin, are deprecated. The underlying Amazon Sumerian service stopped accepting new customers, and existing customer scenes became unavailable after February 21, 2023. Attempting to use `amplify xr` commands will no longer provision functional XR resources. ↓
gotcha Ignoring `amplify push` after making local configuration changes for any Amplify category will result in your cloud environment not reflecting the desired state. This is fundamental to Amplify CLI usage. ↓
gotcha Ensure your AWS credentials and region are correctly configured using `amplify configure`. Inconsistent or incorrect region settings, or insufficient IAM permissions for the AWS account, can lead to deployment failures or inaccessible resources. ↓
Install
npm install amplify-category-xr yarn add amplify-category-xr pnpm add amplify-category-xr Imports
- amplify xr add wrong
import { add } from 'amplify-category-xr'correctamplify xr add - amplify xr update wrong
import { updateXr } from 'amplify-category-xr'correctamplify xr update - amplify xr push wrong
require('amplify-category-xr').push()correctamplify xr push
Quickstart
# Ensure Amplify CLI is installed globally
npm install -g @aws-amplify/cli
# Initialize a new Amplify project (if not already done)
amplify init
# Attempt to add an XR resource (will prompt for details)
# Note: This command will no longer provision functional resources due to underlying service deprecation.
amplify xr add
# Follow the CLI prompts, e.g., choosing a scene name and initial assets.
# Push the changes to deploy the (now non-functional) XR resources to the cloud
amplify push --yes