aws-samples / aws-samples/sample-Elasticache-iam-authentication-python-demo-application
Add documentation and examples for ElastiCache Serverless support in IAM authentication
- 主要言語
- Python
- スター
- 2
- フォーク
- 1
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
## Summary
The current README and code examples do not mention ElastiCache Serverless cache support, but the IAM authentication token generator (`iam_authtoken_generator_app.py`) works with serverless caches when using the serverless cache name as the replication group ID.
## Current State
- Documentation only mentions non-serverless ElastiCache clusters
- Code examples use replication groups
- No mention of serverless cache compatibility
## What I Tested
I successfully generated a valid IAM authentication token for an ElastiCache Serverless cache as follows:
**Environment:**
- ElastiCache engine: Valkey
- ElastiCache user name: `user-1`
- Region: `ap-northeast-1`
- Python version: `Python 3.9.24`
- valkey-cli: 8.0.6
**Steps:**
1. Created an ElastiCache Serverless for Valkey cache
2. Ran the script: python `iam_authtoken_generator_app.py`
```bash
$ TOKEN=$(python3 ./iam_authtoken_generator_app.py --user-id user-a --replication-group-id --region ap-northeast-1)
```
3. Authenticated using `valkey-cli`
```bash
$ valkey-cli -h -p 6379 --tls --user user-a --pass "$TOKEN"
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
:6379> info
# Server
redis_version:7.2
server_name:valkey
valkey_version:8.1
redis_mode:cluster
```
**Key Finding:**
The existing code (`iam_authtoken_generator_app.py`) works with serverless caches without modification - just use the serverless cache name where you would normally use a replication group ID.
## Requested Changes
1. **Update README.md** to include ElastiCache Serverless as a supported cache type
2. **Add code example** showing how to use serverless cache names
3. **Clarify parameter usage** - document that serverless cache names can be used as `replication_group_id`
4. **Add serverless-specific example** in the code or documentation
## Benefits
- Helps users understand that this tool works with both non-serverless and serverless ElastiCache
- Reduces confusion about parameter usage for serverless caches
- Makes the repository more comprehensive and up-to-date with current AWS offerings
コントリビューションガイド
調査の方向性
README.md と iam_authtoken_generator_app.py から始め、既存のコマンド例と、この issue でテストされた serverless 呼び出しを確認します。ElastiCache Serverless のサポートをドキュメント化し、serverless キャッシュの名前が replication_group_id として指定されることを説明し、関連するパラメータを示す serverless 固有の例を追加します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- aws, python
- 領域
- documentation
- issue の種類
- ドキュメント
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 48/100