{"id":18108,"library":"amplify-category-interactions","title":"Amplify CLI Interactions Plugin","description":"Amplify CLI plugin for managing interactions resources (e.g., Amazon Lex chatbots) within an AWS Amplify project. Version 4.3.2 is the latest stable release. This plugin provides CLI commands to add, update, push, and remove interactions resources. It is part of the Amplify CLI ecosystem and relies on the Amplify core infrastructure. Key differentiators: tightly integrated with Amplify CLI workflow, supports Lex bots, and automatically generates CloudFormation templates. Release cadence follows Amplify CLI releases, approximately monthly.","status":"active","version":"4.3.2","language":"javascript","source_language":"en","source_url":"https://github.com/aws-amplify/amplify-cli","tags":["javascript","amplify","aws","typescript"],"install":[{"cmd":"npm install amplify-category-interactions","lang":"bash","label":"npm"},{"cmd":"yarn add amplify-category-interactions","lang":"bash","label":"yarn"},{"cmd":"pnpm add amplify-category-interactions","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core Amplify CLI required to use this plugin","package":"amplify-cli","optional":false},{"reason":"Plugin package name for interactions","package":"@aws-amplify/amplify-category-interactions","optional":false}],"imports":[{"note":"ESM only; TypeScript ships types. Default export is the plugin instance.","wrong":"const interactionsPlugin = require('@aws-amplify/amplify-category-interactions');","symbol":"default","correct":"import interactionsPlugin from '@aws-amplify/amplify-category-interactions';"},{"note":"Named export for resource management utilities.","wrong":"","symbol":"InteractionsResourceManager","correct":"import { InteractionsResourceManager } from '@aws-amplify/amplify-category-interactions';"},{"note":"Type-only import for TypeScript users; avoid runtime usage.","wrong":"const { InteractionsConfig } = require('@aws-amplify/amplify-category-interactions');","symbol":"type InteractionsConfig","correct":"import type { InteractionsConfig } from '@aws-amplify/amplify-category-interactions';"}],"quickstart":{"code":"import { addResource, pushResources } from '@aws-amplify/amplify-category-interactions';\nimport { $TSContext } from 'amplify-cli-core';\n\nasync function setupInteractions(context: $TSContext) {\n  // Add a Lex bot resource\n  await addResource(context, {\n    name: 'myChatbot',\n    botName: 'OrderFlowers',\n    botAlias: '$LATEST',\n    sessionTimeout: 5,\n    // Additional config\n  });\n\n  // Push resources to cloud\n  await pushResources(context);\n}","lang":"typescript","description":"Shows how to add and push a Lex bot resource using the interactions plugin API."},"warnings":[{"fix":"Upgrade to Node.js 14 or later.","message":"v4 dropped support for Node.js 12 and earlier.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Update any custom Lex client code to use @aws-sdk/client-lex-runtime-service.","message":"v3 migrated from AWS SDK v2 to v3 for Lex runtime calls.","severity":"breaking","affected_versions":">=3.0.0 <4.0.0"},{"fix":"Use `--intent '{\"name\":\"IntentName\",\"slots\":{}}'` instead.","message":"The `interactions add` command's `--slots` parameter is deprecated in favor of `--intent` object.","severity":"deprecated","affected_versions":">=2.0.0"},{"fix":"Run `npm install -g @aws-amplify/amplify-category-interactions` after installing `@aws-amplify/cli`.","message":"Plugin must be installed after Amplify CLI or the `amplify interactions` commands won't be recognized.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use `amplify interactions status` to list existing resources before adding.","message":"Resource names must be alphanumeric and unique within a project; collisions cause silent overwrites.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use `amplify interactions update` to modify existing resources.","message":"The `amplify interactions configure` command has been removed in v3.0.0.","severity":"deprecated","affected_versions":">=3.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run `npm install -g @aws-amplify/amplify-category-interactions`.","cause":"Plugin not installed globally or not linked in the project.","error":"Cannot find module '@aws-amplify/amplify-category-interactions'"},{"fix":"Use `amplify interactions add` only for Amazon Lex resources.","cause":"Misunderstanding of what the plugin does.","error":"amplify interactions add only supports Lex bots, not any other service"},{"fix":"Use `amplify interactions update` to modify existing resource or remove first.","cause":"Duplicate resource name.","error":"Resource 'myBot' already exists in this project."},{"fix":"Use a numeric alias version (e.g., '1') or create an alias in the Lex console.","cause":"Lex requires a specific alias version for persistent sessions.","error":"Invalid bot alias: $LATEST is not allowed for session timeout > 0"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}