AWS Account Setup
Complete these steps in the AWS Console before connecting to 4MINDS.Step 1: Note Your AWS Region
- Sign in to the AWS Management Console
- The active region appears in the top-right of the AWS console (e.g.,
us-east-1). You’ll need to enter this when connecting in 4MINDS - Common regions include
us-east-1,us-west-2,eu-west-1,eu-central-1
Step 2: Create the IAM Permissions Policy
This policy grants the minimum permissions needed for the 4MINDS Bedrock integration. You will attach it to whichever identity you use (IAM user, IAM role, or Cognito authenticated role).- Go to AWS Console → IAM (search for “IAM” in the top search bar)
- Click Policies in the left sidebar
- Click Create policy
- Click the JSON tab (switch from the visual editor)
- Delete any existing content and paste the following policy:
| Permission | Purpose |
|---|---|
bedrock:ListFoundationModels | Lists available foundation models (Claude, Llama, Mistral, etc.) |
bedrock:GetFoundationModel | Retrieves details about a specific foundation model |
bedrock:InvokeModel | Sends prompts and receives responses from models |
bedrock:InvokeModelWithResponseStream | Enables streaming responses for real-time output |
bedrock:ListCustomModels | Lists any custom fine-tuned models in your account |
bedrock:GetCustomModel | Retrieves details about a specific custom model |
sts:GetCallerIdentity | Verifies the connection is authenticated correctly |
- Click Next
- Name the policy:
4MINDS-Bedrock-Access(or any name you prefer) - Optionally add a description: “Permissions for 4MINDS platform to access Amazon Bedrock models”
- Click Create policy
Least-Privilege: Restricting to Specific Models
The policy above uses"Resource": "*" for broad access. If your organization requires least-privilege, you can scope the Resource field to specific regions or individual models.
Restrict to a single region:
arn:aws:bedrock:<region>::foundation-model/<model-id>
Note: If you restrict to specific models, theListFoundationModelsandListCustomModelsactions still require"Resource": "*"to function. You can split these into separate statements — one with"Resource": "*"for listing, and another scoped to specific model ARNs forInvokeModelandInvokeModelWithResponseStream.
Connection Methods
Method 1: IAM Role Federation (Recommended)
This is the most secure option. No long-lived credentials are stored — 4MINDS uses temporary AWS credentials generated on-the-fly via OIDC federation. Each request gets short-lived credentials (1 hour) that are never persisted.AWS Setup
A. Register 4MINDS as an OIDC Identity Provider- Go to AWS Console → IAM → Identity Providers (left sidebar)
- Click Add Provider
- Select OpenID Connect as the provider type
- For Provider URL, enter:
https://app.4MINDS.ai - Click Get thumbprint — AWS will verify the provider’s SSL certificate
- For Audience, enter:
sts.amazonaws.com - Click Add provider
- You should now see
app.4MINDS.aiin your list of identity providers
- Go to IAM → Roles (left sidebar)
- Click Create role
- Under Trusted entity type, select Web identity
- Under Identity provider, select
app.4MINDS.aifrom the dropdown - Under Audience, select
sts.amazonaws.com - Click Next
- Search for the policy you created earlier (
4MINDS-Bedrock-Access) and check the box next to it - Click Next
- Enter a Role name:
4MINDS-bedrock-role(or your preferred name) - Optionally add a description: “Allows 4MINDS to access Bedrock via OIDC federation”
- Review the trust policy and permissions, then click Create role
- Copy the Role ARN from the role summary page — it looks like:
arn:aws:iam::123456789012:role/4MINDS-bedrock-role
- Go to IAM → Roles and click on your new role
- Click the Trust relationships tab
- Click Edit trust policy
- It should look like this:
<YOUR_ACCOUNT_ID> with your 12-digit AWS account ID (visible in the top-right of the AWS Console under your account name).
Optional — External ID: For additional security, you can add an external ID condition. If you do, you’ll also need to enter the same External ID in 4MINDS when connecting.
Connect in 4MINDS
- In 4MINDS, go to Settings → Integrations → Amazon Bedrock
- Select the IAM Role tab
- Paste your IAM Role ARN (the one you copied in step B.12)
- If you configured an External ID in the trust policy, enter it here too
- Enter your AWS Region (e.g.,
us-east-1— must match the region where you enabled Bedrock model access) - Click Test Connection to verify, then Save Credentials
Method 2: Bedrock API Key
This is the simplest setup. You generate an API key directly from the Amazon Bedrock console — no IAM user or role creation needed.AWS Setup
- Go to AWS Console → Amazon Bedrock
- In the left sidebar, click API keys
- Choose which type of key to generate: Short-term API key (recommended for production)
- Expires when your console session expires (12 hours by default)
- More secure — limits exposure if the key is compromised
- Click Generate short-term API keys Long-term API key
- Can be set to last longer than 12 hours
- More convenient but less secure — AWS recommends using these only for exploratory purposes
- Click Long-term API keys, configure the expiration, and generate
- Copy the API key once it’s generated
Note: If you use a short-term key, you’ll need to generate a new one and update your 4MINDS connection each time it expires. For a set-it-and-forget-it setup, consider IAM Role Federation (Method 1) instead.
Connect in 4MINDS
- In 4MINDS, go to Integrations → Amazon Bedrock → Settings
- Select the API Key tab
- Paste the Bedrock API key you copied above
- Enter your AWS Region (e.g.,
us-east-1— must match the region where you enabled Bedrock model access) - Click Test Connection to verify, then Save Credentials
Security note: We encrypt your API key at rest. For production environments requiring maximum security, we recommend IAM Role Federation (Method 1) which uses temporary credentials and stores nothing long-lived.
Method 3: Amazon Cognito
Use this method if your organization manages AWS access through Amazon Cognito user pools and identity pools. This is common in organizations that already use Cognito for identity management.Already have Cognito set up? If your organization already has a Cognito User Pool and Identity Pool configured, skip to Gather Your Cognito Details below.
AWS Setup (Full Cognito Configuration)
If you need to set up Cognito from scratch, follow all steps below. If you already have Cognito infrastructure, skip to the relevant step. A. Create a Cognito User Pool- Go to AWS Console → Amazon Cognito (search for “Cognito” in the top search bar)
- Click Create user pool
- Under Sign-in experience:
- For Cognito user pool sign-in options, check User name (and optionally Email)
- Click Next
- Under Security requirements:
- Configure your password policy as desired (the defaults are fine)
- For Multi-factor authentication, select No MFA for simplest setup (or configure MFA if required by your organization)
- Click Next
- Under Sign-up experience:
- Uncheck Enable self-registration (you’ll create the user manually)
- Click Next
- Under Message delivery:
- Select Send email with Cognito for simplest setup
- Click Next
- Under Integrate your app:
- Enter a User pool name:
4MINDS-bedrock-pool(or your preferred name) - Under App client, enter an App client name:
4MINDS-bedrock-client - For Client secret, select Generate a client secret (optional — 4MINDS supports both with and without)
- Under Authentication flows, ensure ALLOW_USER_PASSWORD_AUTH is checked (this is required)
- Click Next
- Enter a User pool name:
- Review and click Create user pool
- Copy the User Pool ID from the overview page — it looks like:
us-east-1_aBcDeFgHi
- In your new User Pool, go to the App integration tab
- Scroll down to App clients and analytics
- Click on the app client you just created
- Copy the Client ID — looks like:
1abc2def3ghi4jkl5mno6pqr - If you generated a client secret, click Show client secret and copy it
- In your User Pool, go to the Users tab
- Click Create user
- For User name, enter:
4MINDS-bedrock-user(or your preferred name) - Enter a Temporary password or set a permanent password
- Optionally enter an email address
- Click Create user
- If you used a temporary password, you’ll need to sign in once to set a permanent password (the user status will show “Force change password” until then)
Note: If the user has a temporary password and status shows “FORCE_CHANGE_PASSWORD”, you need to complete the password change before 4MINDS can authenticate. You can do this via the AWS CLI:D. Create a Cognito Identity Pool The Identity Pool maps authenticated Cognito users to IAM roles.
- Go to Amazon Cognito → Identity pools (or Federated Identities in older console)
- Click Create identity pool
- Under User access, select Authenticated access
- Under Authenticated identity sources, select Amazon Cognito user pool
- Click Next
- Under Configure permissions:
- Select Create a new IAM role
- Enter a role name:
4MINDS-bedrock-cognito-role - Click Next
- Under Connect identity providers:
- For User Pool ID, enter the User Pool ID from step A.9
- For App Client ID, enter the Client ID from step B.4
- Click Next
- Enter an Identity pool name:
4MINDS-bedrock-identity-pool - Review and click Create identity pool
- Copy the Identity Pool ID — it looks like:
us-east-1:12345678-abcd-1234-efgh-123456789012
- Go to IAM → Roles
- Search for the role created in step D.6 (e.g.,
4MINDS-bedrock-cognito-role) - Click on the role
- Click Add permissions → Attach policies
- Search for the
4MINDS-Bedrock-Accesspolicy you created earlier - Check the box and click Add permissions
Gather Your Cognito Details
Before connecting in 4MINDS, make sure you have all of these values:| Field | Where to find it | Example |
|---|---|---|
| User Pool ID | Cognito → User Pools → select your pool → Overview | us-east-1_aBcDeFgHi |
| App Client ID | Cognito → User Pools → App integration → App clients | 1abc2def3ghi4jkl5mno6pqr |
| App Client Secret | Same as above (only if you generated one) | abcdef123456... |
| Identity Pool ID | Cognito → Identity Pools → select your pool | us-east-1:12345678-abcd-1234-efgh-123456789012 |
| Username | The Cognito user you created in step C | 4MINDS-bedrock-user |
| Password | The permanent password for that user | — |
Connect in 4MINDS
- In 4MINDS, go to Integrations → Amazon Bedrock → Settings
- Select the Cognito tab
- Fill in all the fields from the table above
- If your app client has a secret, toggle on the App Client Secret option and enter it
- Enter your AWS Region (e.g.,
us-east-1— must match the region of your User Pool and Identity Pool) - Click Test Connection to verify, then Save Credentials
Testing Your Connection
After entering your credentials via any method:- Click Test Connection — this validates your credentials and checks permissions
- On success, you’ll see a message like: “Connection successful! Found X foundation model(s) and Y custom model(s).”
- Click Save Credentials to persist the connection
- “Invalid Access Key ID” — Double-check the access key
- “Invalid Secret Access Key” — The secret may have been copied incorrectly
- “Access Denied” — The IAM policy is missing or not attached to the correct identity
- “Unrecognized client” — Wrong region, or Bedrock isn’t enabled in that region
After Connecting: Adding Models
Once connected:- Go to Integrations → Amazon Bedrock
- Browse the list of available foundation models — all supported models will be listed automatically
- Click to register models you want to use in your 4MINDS workspace
- Registered models will appear in your model selector for conversations
Supported AWS Regions
Amazon Bedrock is available in select regions. Common options:us-east-1(N. Virginia)us-east-2(Ohio)us-west-2(Oregon)eu-west-1(Ireland)eu-central-1(Frankfurt)ap-southeast-1(Singapore)ap-northeast-1(Tokyo)
Troubleshooting
| Issue | Solution |
|---|---|
| ”No models found” | Verify the region is correct and that your IAM policy includes bedrock:ListFoundationModels |
| Connection times out | Verify the region is correct and Bedrock is enabled there |
| ”Access Denied” after connecting | Attach the IAM policy to the correct user/role — check for typos in the policy |
| Cognito auth challenge | Your Cognito user may need to complete a password change or MFA setup first |
| Role federation fails | Verify the OIDC provider URL is exactly https://app.4MINDS.ai with audience sts.amazonaws.com |
Disconnecting
To remove your Bedrock connection:- Go to Settings → Integrations → Amazon Bedrock
- Click Disconnect

