Amit Arora faa5672f84 Update SRE Agent with AgentCore package updates and documentation restructure
- Updated pyproject.toml to use latest versions of boto3, botocore, awscli, and agentcore packages
- Merged main branch changes with conflict resolution
- Restructured README.md to follow template format with overview, prerequisites, setup, and execution sections
- Created detailed documentation structure in docs/ folder with specialized content files
- Updated package dependencies to use version constraints instead of local wheel files
- Removed production-specific language and focused on demo/sample implementation
- Added comprehensive documentation covering agents, configuration, deployment, and development
2025-07-16 13:23:39 +00:00

33 lines
1.0 KiB
Bash
Executable File

#!/bin/bash
# Generate Cognito access token for SRE Agent Gateway
# Extracts token generation functionality from create_gateway.sh
# Get the directory where this script is located
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Load environment variables from .env file
if [ -f "${SCRIPT_DIR}/.env" ]; then
echo "📋 Loading environment variables from gateway/.env file..."
# Source the .env file safely
set -a # automatically export all variables
source "${SCRIPT_DIR}/.env"
set +a # stop automatically exporting
else
echo "❌ Error: No .env file found in gateway directory"
echo "Please create .env file with COGNITO_* variables"
exit 1
fi
# Generate Cognito access token
echo "🔑 Generating Cognito access token..."
echo "Make sure your .env file is configured with COGNITO_* variables"
cd "${SCRIPT_DIR}"
if python generate_token.py; then
echo "✅ Access token generated successfully!"
echo "📁 Access token saved to .access_token"
else
echo "❌ Failed to generate access token"
exit 1
fi