Overview
AWS credentials are required to authenticate your Workshop Cloud Chat application with Amazon Web Services. These credentials grant access to AWS Bedrock, S3, and Knowledge Base services.Required Credentials
Workshop Cloud Chat requires the following AWS credentials:Your AWS Access Key ID. This is a unique identifier associated with your AWS account.Example:
AKIAIOSFODNN7EXAMPLEYour AWS Secret Access Key. This is the secret key paired with your Access Key ID.Example:
wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEYThis field is masked as a password input in the configuration dialog.
Optional AWS Session Token for temporary security credentials.Used when authenticating with temporary credentials from AWS STS (Security Token Service) or when assuming an IAM role.
Configuration Steps
Open Configuration Dialog
Click the gear icon (⚙) next to “Chat con Agente (Amazon Bedrock)” in the main interface to open the configuration dialog.The dialog title will be “Configuración de chat y credenciales”.
Enter AWS Credentials
In the “Credenciales AWS” section, enter your credentials:
- AWS Access Key ID: Enter your access key ID (required)
- AWS Secret Access Key: Enter your secret access key (required)
- AWS Session Token: Enter session token if using temporary credentials (optional)
Save Configuration
Click the “Guardar” button to save your credentials.The credentials are stored in browser’s localStorage under the key
workshop-cloud-chat-config-v1.How Credentials Are Used
The AWS credentials authenticate API requests to:Bedrock Agent Runtime
Fromsrc/pages/api/chat.ts:31-38:
S3 Client
Fromsrc/pages/api/upload-pdf.ts:6-19:
Bedrock Agent Client (Knowledge Base)
Fromsrc/pages/api/sync.ts:45-52:
Obtaining AWS Credentials
Sign in to AWS Console
Go to the AWS Management Console and sign in with your account.
Create or Select User
- Go to Users in the left sidebar
- Either select an existing user or click Add users to create a new one
- For a new user, select Access key - Programmatic access
Attach Required Policies
Ensure the user has permissions for:
AmazonBedrockFullAccess(for Bedrock agent interactions)AmazonS3FullAccess(for PDF uploads and document management)- Or create a custom policy with specific permissions
Managing Credentials
Clear Configuration
To remove stored credentials:- Open the configuration dialog
- Click “Borrar configuraciones” button
- This clears all AWS credentials and Bedrock configuration from localStorage
Update Credentials
To update credentials:- Open the configuration dialog
- Enter the new credentials
- Click “Guardar” to overwrite the existing configuration
Storage Details
Credentials are stored in the browser’s localStorage with the following structure: Fromsrc/pages/index.astro:1144-1154:
The storage key used is:
workshop-cloud-chat-config-v1Troubleshooting
Invalid Credentials Error
If you receive authentication errors:- Verify your Access Key ID and Secret Access Key are correct
- Check that the IAM user has the required permissions
- Ensure the credentials haven’t been rotated or disabled
Session Token Expired
If using temporary credentials:- Temporary credentials expire after a set duration (usually 1-12 hours)
- Request new temporary credentials from AWS STS
- Update the configuration with the new session token
Configuration Not Persisting
If credentials don’t persist across page reloads:- Check that browser localStorage is enabled
- Verify you’re not in private/incognito mode (some browsers restrict localStorage)
- Check browser console for any localStorage errors
Best Practices
Use IAM Roles
When possible, use IAM roles with temporary credentials instead of long-term access keys.
Principle of Least Privilege
Grant only the minimum permissions required for the application to function.
Rotate Regularly
Rotate access keys every 90 days or when a team member leaves.
Monitor Usage
Use AWS CloudTrail to monitor API calls made with your credentials.
Next Steps
After configuring AWS credentials, proceed to:- Configure Bedrock Agent for AI chat functionality
- Set up S3 for document storage
- Configure Knowledge Base for document synchronization