View a markdown version of this page

开始使用 - 亚马逊 ElastiCache

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

开始使用

使用以下命令安装 ElastiCache 技能:

npx skills add aws/agent-toolkit-for-aws/skills/specialized-skills/database-skills/amazon-elasticache -g -a <agent-id> --full-depth

<agent-id>在安装命令中替换为编码代理的标识符。下表列出了支持的编码代理的标识符。安装程序会将 ElastiCache AWS Agent Toolkit 存储库中的技能添加到编码代理使用的全局技能目录中,使其可用于您的所有项目。

座席 <agent-id> 全球技能之路 项目技能路径
Claude Code claude-code ~/.claude/skills/ .claude/skills/
Cursor cursor ~/.cursor/skills/ .agents/skills/
GitHub 副驾驶 github-copilot ~/.copilot/skills/ .agents/skills/
Codex codex ~/.codex/skills/ .agents/skills/
Gemini CLI gemini-cli ~/.gemini/skills/ .agents/skills/
Kiro CLI kiro-cli ~/.kiro/skills/ .kiro/skills/
克莱恩 cline ~/.agents/skills/ .agents/skills/
goose ~/.config/goose/skills/ .goose/skills/
Windsurf windsurf ~/.codeium/windsurf/skills/ .windsurf/skills/

要改为在本地为单个项目安装技能,请省略标-g志。该技能将安装到上表中列出的项目技能路径中。

注意

该技能由您的代理在本地运行。对于创建或修改 AWS 资源的任务,您的代理需要通过 AWS Command Line Interface、环境变量或 IDE AWS 插件配置的 AWS 凭据。

用法示例

安装后,您可以提示您的代理使用该 ElastiCache 技能进行构建。

以下示例使用 “使用 Amazon ElastiCache 技能...” 作为前缀:

  • 评估工作负载Use the Amazon ElastiCache skill to decide whether ElastiCache is right for my FastAPI app. The app reads heavily from Aurora PostgreSQL and has latency spikes during peak traffic.

  • 创建安全缓存Use the Amazon ElastiCache skill to create a Valkey cache in us-east-1 for my ECS service. Use TLS and recommend the right authentication model.

  • Connect 应用程序Use the Amazon ElastiCache skill to connect my Lambda function to an existing Valkey cache. Show the VPC, security group, and client code changes.

  • 创建速率限制器Use the Amazon ElastiCache skill to build an API rate limiter with Valkey. I need per-user limits and atomic updates.

  • 为 GenAI 添加语义缓存Use the Amazon ElastiCache skill to add semantic caching for Amazon Bedrock responses. Include embedding storage, similarity lookup, thresholding, and fallback behavior.

  • 对性能进行故障排除Use the Amazon ElastiCache skill to pinpoint the cause of high CPU utilization on my cache cluster.

注意

当您的提示描述相关工作负载(例如缓存、会话或速率限制)时,某些代理会自动加载 ElastiCache 技能。如果您的代理没有自动加载技能,请在提示中包括 “使用 ElastiCache 技能”。