The `@aws-amplify/amplify-category-notifications` package is a core plugin for the AWS Amplify Command Line Interface (CLI), enabling developers to manage notification channels, primarily through Amazon Pinpoint. It allows for the addition, removal, updating, and status checking of notification channels directly from the command line, and provides a shortcut to the Pinpoint console for detailed configuration. This package is part of the larger Amplify CLI monorepo, with its latest stable version being `2.26.42`. It receives frequent updates, typically alongside the rapid release cadence of the Amplify CLI itself, ensuring compatibility with the latest AWS services and addressing security concerns. Its key differentiator is its deep integration into the Amplify development workflow, abstracting complex AWS Pinpoint configurations into simple CLI commands. This package is primarily for internal use by the Amplify CLI and for advanced users extending the CLI functionality.
npm install amplify-category-notificationsVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to programmatically interact with the Amplify CLI to add and configure a push notification channel using the underlying `amplify-category-notifications` plugin. It simulates the `amplify add notifications` command, which is the primary way developers utilize this package.
For application logic, use client-side Amplify libraries (e.g., `aws-amplify` or `@aws-amplify/pushnotification`). Interact with notification backend setup via the Amplify CLI commands (e.g., `amplify add notifications`).
Monitor Amplify CLI release notes closely for explicit breaking changes related to AWS SDK v3 migration. Update CLI and related packages incrementally, and thoroughly test existing deployments.
Ensure all certificate and key file paths provided during `amplify add notifications` are absolute or correctly relative to the project root. Double-check that certificate/key files are valid and correctly generated from your Apple Developer or Firebase console.
Upgrade to `@aws-amplify/amplify-category-notifications@2.26.42` or later to ensure these security vulnerabilities are patched. Regularly update your Amplify CLI.
Be aware that notification setup is tightly coupled with the Auth category. Avoid manual modifications to Cognito resources that were provisioned by Amplify for notifications without fully understanding the dependencies. For unauthenticated users, ensure analytics events are authorized during setup.
Install the Amplify CLI globally: `npm install -g @aws-amplify/cli` or `yarn global add @aws-amplify/cli`. Ensure your system's PATH includes the global npm/yarn bin directory.
Run `amplify add notifications` interactively, or provide options using flags for non-interactive execution, e.g., `amplify add notifications --channel APNS` and include necessary certificate/key paths using `--json-file-path` or `--p12-file-path` flags.
Ensure the IAM user/role used by the Amplify CLI (configured via `amplify configure`) has appropriate `mobiletargeting` permissions, including `UpdateApnsChannel`, `UpdateGcmChannel`, `GetChannel` actions for Amazon Pinpoint. Review and update the IAM policy attached to your Amplify CLI user/role.
Ensure `aws-amplify` and `@aws-amplify/pushnotification` are installed, imported, and `Amplify.configure(awsconfig)` is called early in your application's lifecycle, using the `aws-exports.js` file generated by the Amplify CLI. Also, confirm the push notifications category is correctly added to your backend via `amplify add notifications` and `amplify push`.
No dependency data recorded yet.