2025-07-16 14:07:30 -04:00
|
|
|
#!/bin/bash
|
|
|
|
# Bedrock AgentCore Gateway - Okta PKCE Local Development Setup
|
|
|
|
|
fix (02-use-cases): AWS Operations Agent updated with AgentCore Runtime (#177)
* feat: Add AWS Operations Agent with AgentCore Runtime
- Complete rewrite of AWS Operations Agent using Amazon Bedrock AgentCore
- Added comprehensive deployment scripts for DIY and SDK runtime modes
- Implemented OAuth2/PKCE authentication with Okta integration
- Added MCP (Model Context Protocol) tool support for AWS service operations
- Sanitized all sensitive information (account IDs, domains, client IDs) with placeholders
- Added support for 17 AWS services: EC2, S3, Lambda, CloudFormation, IAM, RDS, CloudWatch, Cost Explorer, ECS, EKS, SNS, SQS, DynamoDB, Route53, API Gateway, SES, Bedrock, SageMaker
- Includes chatbot client, gateway management scripts, and comprehensive testing
- Ready for public GitHub with security-cleared configuration files
Security: All sensitive values replaced with <YOUR_AWS_ACCOUNT_ID>, <YOUR_OKTA_DOMAIN>, <YOUR_OKTA_CLIENT_ID> placeholders
* Update AWS Operations Agent architecture diagram
---------
Co-authored-by: name <alias@amazon.com>
2025-07-31 11:59:30 -07:00
|
|
|
PROJECT_DIR="<project directory path>"
|
2025-07-16 14:07:30 -04:00
|
|
|
|
|
|
|
echo "🚀 Setting up Bedrock AgentCore Gateway Okta PKCE Local Development Environment"
|
|
|
|
|
|
|
|
# Check for nginx
|
|
|
|
if ! command -v nginx &> /dev/null; then
|
|
|
|
echo "❌ nginx not found. Please install nginx first."
|
|
|
|
echo " macOS: brew install nginx"
|
|
|
|
echo " Ubuntu: sudo apt-get install nginx"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Check if nginx is running
|
|
|
|
if ! pgrep nginx > /dev/null; then
|
|
|
|
echo "⚠️ nginx is not running. Starting nginx..."
|
|
|
|
sudo nginx
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Start nginx with our configuration
|
|
|
|
echo "🔄 Starting nginx with Okta PKCE configuration..."
|
|
|
|
sudo nginx -c "$PROJECT_DIR/nginx/okta-local.conf"
|
|
|
|
|
|
|
|
# Check if nginx started successfully
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
echo "✅ nginx started successfully with Okta PKCE configuration"
|
|
|
|
echo "🌐 Open http://localhost:8080/okta-auth/ in your browser"
|
|
|
|
else
|
|
|
|
echo "❌ Failed to start nginx with Okta PKCE configuration"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "🔧 Next steps:"
|
|
|
|
echo "1. Update iframe-oauth-flow.html with your Okta settings:"
|
|
|
|
echo " - domain: YOUR_OKTA_DOMAIN.okta.com"
|
|
|
|
echo " - clientId: YOUR_CLIENT_ID"
|
|
|
|
echo " - bedrock_agentcore URLs: YOUR_GATEWAY_ID and YOUR_REGION"
|
|
|
|
echo ""
|
|
|
|
echo "2. Update Okta redirect URIs to include:"
|
|
|
|
echo " - http://localhost:8080/okta-auth/"
|
|
|
|
echo ""
|
|
|
|
echo "3. To stop nginx when done:"
|
|
|
|
echo " sudo nginx -s stop"
|
|
|
|
echo ""
|
|
|
|
echo "4. To view nginx logs:"
|
|
|
|
echo " tail -f /usr/local/var/log/nginx/error.log"
|
|
|
|
echo ""
|