Moodle AI with AWS Bedrock

Connecting Moodle 5.2 or later to AWS Bedrock lets you pick a foundation model per AI action and keep prompts inside your AWS account. This page covers the decisions, setup checks and limits to confirm.

On this page

What Moodle AI with AWS Bedrock does and when to use it

If your organization runs on AWS and wants Moodle's AI features without sending prompts to a provider outside that environment, the Bedrock provider is the option to evaluate first. The AWS Bedrock provider selects a model for each action, including image generation, from the foundation models supported in Amazon Bedrock. That gives you control over which model handles course assistance, which handles text generation in the editor and which handles images, all within one provider configuration. It requires Moodle 5.2 or later, so a site still on an older release must upgrade before this provider is available.

Bedrock fits best when your cloud, identity, logging and data agreements already sit in AWS, and your security or compliance team has reviewed AWS as an approved processor. Compare it with the other core providers on the factors that matter to you: where prompts are processed, which contract terms apply, which actions each provider supports and what each model costs to run. If your team already holds an AWS account with Bedrock model access, the procurement and review conversation is shorter. If you need a provider that keeps prompts on servers you run yourself, a self-hosted Ollama server may fit better. Confirm the supported model list and regional availability in your own AWS account before you commit to a design, since both change over time.

This page assumes a Moodle site already runs, is reachable by its users and has an upgrade path to Moodle 5.2 or later. It does not cover installing Moodle, configuring the AI subsystem's placements or writing an AI user policy. Those topics have their own pages in this group. The work here starts from a working site and an AWS account that a platform owner can administer, and it focuses on model selection per action, IAM credentials and region, image generation and keeping traffic inside your AWS environment.

Configuration options and when each fits

This table compares the decisions a team makes when connecting Moodle to AWS Bedrock: model per action, region, credential method and provider choice. Read each row for the condition that makes an option fit and the constraint it places on the rest of the setup. The main takeaway is that model availability and region are linked, so confirm both before choosing models.

DecisionWhen it fitsWhat it constrains
Model per action (text)Use a text model for summarise and explain actions in course assistance when prompts are mostly plain instructional textEach action takes its own model, so each model must be enabled in the Bedrock account and region you use
Model per action (image generation)Choose an image-capable model only if teachers will use image generation in the text editorNot every text model supports images, so image generation may need a separate model choice and separate access approval
Region selectionPick the region where your data residency and latency requirements are met and where your chosen models are offeredModel availability varies by region, so confirm the models you need in that region before setting it in Moodle
IAM role credentialsUse when Moodle runs on AWS infrastructure that can assume a role, such as an instance or container roleRequires role trust and least-privilege policies on the Bedrock actions Moodle calls, and ties rotation to AWS identity tooling
Access keysUse only where a role cannot be attached, such as a host outside AWS, with a dedicated IAM user for MoodleLong-lived keys must be stored, rotated and revoked by your team, and a leaked key grants whatever the user is allowed to do
Bedrock providerChoose when your organization already runs on AWS and wants prompts to stay within an AWS account and its controlsTraffic stays within your AWS environment, but supported actions and models depend on what Bedrock offers in your region
Other Moodle AI providersChoose a different provider when a required action, model or contract term is not available through BedrockEach provider has its own data handling, billing and model list, so the policy and reporting setup must cover each one used

How to connect Moodle to Bedrock step by step

This sequence takes a Moodle 5.2 or later site from version and server checks to a tested Bedrock connection, with each action assigned a model and verified before users see it. Each step closes with a check so the team knows it can move on.

  1. Confirm Moodle version, PHP and database requirements

    Confirm the site runs Moodle 5.2 or later and that the web server, PHP and database meet the requirements for that release, including 64-bit PHP and a supported database version. Check that the web server document root points to the /public directory, which Moodle 5.1 and later require. Done means the site's version and environment report matches the release notes, and a test page loads from the public root without directory listings or errors. Confirm the exact PHP and database minimums for 5.2 in the 5.2 release notes before you start, since the figures for 5.1 and 5.3 differ.

  2. Create a least-privilege IAM identity for Bedrock

    In the AWS account that will hold the calls, create an IAM identity used only by Moodle, such as a dedicated user or a role assumed by the Moodle host, with permission to invoke the foundation models the team has selected. Avoid broad administrator or wildcard policies. Record the access key or role ARN in the team's secrets store rather than in plain text on the server. Done means the identity can be shown in IAM with an invoke-only policy scoped to the chosen models, and a sign-in with other AWS services is denied.

  3. Enable the foundation models in the chosen region

    In the Bedrock console for the region you have chosen, request or confirm access to each foundation model you plan to assign to Moodle actions, such as text and image models. Model availability and access steps vary by region and provider, so confirm both against the AWS documentation for your account. Done means each planned model shows as available in that region, and a direct test invocation from the Moodle host's network returns a response rather than an access error.

  4. Install and enable the Bedrock AI provider

    Install or enable the AWS Bedrock AI provider in Moodle's AI settings, then enter the region and the IAM credentials or role configuration from the previous step. Keep the credentials out of logs and screenshots. Done means the provider shows as enabled with no configuration errors, and the connection check in Moodle succeeds without exposing the secret values on screen.

  5. Assign a model to each AI action

    Map each Moodle AI action, such as summarise, explain, text generation and image generation, to a specific Bedrock foundation model. Choose the model per action based on what the action needs, and record the decision with the data protection and academic integrity owners. Done means every action that will be offered to users has a named model, and the settings page lists no action without an assignment.

  6. Enable placements for approved actions only

    Turn on the placements that will expose AI to users, such as course assistance and the text editor, and leave the rest disabled. Apply access controls from the course, activity and role level where the team has decided AI should not appear. Done means a test account in each target role sees only the placements approved for that role, and the disabled placements are absent from the interface.

  7. Test each action and review CloudTrail

    Run a test call for each enabled action with a non-sensitive sample input and confirm that a sensible response returns. Then open the AWS CloudTrail event history for the period of the tests and confirm that the Bedrock invocation events come from the expected IAM identity, in the expected region and against the expected models. Done means every action has a passing test recorded, and the CloudTrail review shows no calls from unexpected identities, regions or models. Keep the test record with the change request before users are invited to a pilot.

How a Moodle AI request reaches Bedrock inside your AWS account

The path starts when a user triggers an AI action in Moodle, such as course assistance or the text editor. The AI subsystem hands the request to the AWS Bedrock provider plugin, which signs it with IAM credentials and calls the Bedrock runtime endpoint in the region you configure. The response returns the same way. Check the trust boundary: confirm whether a VPC endpoint, security group rules and provider-side logging keep this traffic inside your AWS environment.

Request path from a Moodle user action to Bedrock and back, with trust boundary and controls to confirm.

Keeping AI traffic inside your AWS environment

Moodle sends prompts and returns generated content through the Bedrock provider, so the path those requests take is a design decision, not a default. The six controls below cover where traffic leaves the network, which credentials it carries, which region holds it and what gets logged. Confirm each one with your network and cloud security teams before the provider is enabled for real courses.

Private network path to Bedrock

Decide whether Moodle reaches Bedrock through an interface VPC endpoint from private subnets or through a NAT gateway and the public endpoint. With an endpoint, requests stay on the AWS network and the endpoint policy can limit which Bedrock actions are allowed. Ask your network team to confirm that the web and cron nodes running Moodle have a route to the endpoint and no route to the public internet for this traffic.

Scoped IAM role for invocations

Grant the Moodle host or container an IAM role that can invoke only the foundation models chosen for each action, such as text, summarization and image generation. Restrict the role to the region in use and avoid wildcard model permissions. Confirm with your cloud team that no broader administrative policy is attached to the same role and that the role is not shared with other applications.

Credential rotation and instance roles

Prefer temporary credentials from an instance profile, task role or workload identity over long-lived access keys stored in the Moodle AI provider settings. If static keys must be used, store them in your secrets manager, set a rotation schedule and document who can read them. Confirm the rotation owner and the procedure for revoking a key after a staff change or suspected exposure.

Region choice and data residency

Choose the AWS region for Bedrock based on where your learner data may be processed, not only on latency. Not every foundation model is offered in every region, so the model chosen for an action may constrain the region. Ask your data protection team to confirm the permitted regions and check model availability in the chosen region before the provider configuration is locked.

Invocation logging and retention

Decide whether Bedrock model invocation logging is enabled, where prompts and responses are written, who can read them and how long they are kept. Logs of learner prompts may contain personal data, so storage location and access need the same review as the Moodle logs. Ask your security team to confirm the log destination, encryption, retention period and whether any logs are excluded from broad analytics access.

Separation of Moodle and AI credentials

Keep the credentials that run Moodle (database, file storage, SSO client secret, mail) separate from the credentials that call Bedrock. A single role carrying both sets of rights widens the blast radius of any compromise on the web tier. Confirm with your platform team that the Bedrock role is attached only to the Moodle component that calls the provider, and that the egress proxy rules allow only the Bedrock endpoints the role needs.

Security and operational risks to plan for

How do we keep AWS credentials out of Moodle's configuration?

Use an IAM role or short-lived credentials wherever the hosting setup allows it, and keep any long-lived access keys out of the Moodle admin settings, the database and the web root. Moodle stores provider configuration in its own database, so anyone with administrator access or a database dump can read whatever is saved there. Restrict who holds the Moodle site administrator role, review the AI provider settings after each change, and make sure the web server cannot serve configuration files. Ownership is shared: the platform team owns the credential source and rotation, and the Moodle administrator owns the provider entry and its review. Confirm with your security team how secrets are injected into the host before go-live.

How broad should the IAM policy for Moodle's Bedrock access be?

Grant only the Bedrock invoke permissions for the specific foundation models you have approved for each Moodle action, in the one region you have chosen. Avoid wildcard resource and action statements, and avoid attaching administrative Bedrock permissions to the same identity Moodle uses. Model access in Amazon Bedrock is an account-level setting, so confirm which models are enabled before you write the policy. The cloud or security team owns the policy and its review cycle, and the Moodle team should provide the list of actions and models it needs. Review the policy whenever you change a model or add an image generation placement.

What happens to prompts and generated output after Bedrock processes them?

Prompts and outputs pass through Amazon Bedrock and are then also held by Moodle, so you need to control both places. Check the AWS data handling terms for the model you select, and confirm whether any model invocation logging is enabled in your account, because logging can store full request and response bodies in an S3 bucket or CloudWatch Logs. On the Moodle side, the stored action records and any cached content follow your site's retention rules. Set a retention period for the log bucket, restrict who can read it, and align both with your data protection team's decision. The data protection lead owns the decision, and the AWS account owner configures the logging.

Where do Moodle's AI action logs live, and who can read them?

Moodle records AI action activity in its own database, so the logs are part of your Moodle backups, exports and database access model. Treat them as personal data when they relate to identifiable users. Decide which roles can view the AI usage and user reports, whether reports are exported, and how long records are kept before deletion. Check that database backups and staging copies are handled with the same controls as production. The Moodle administrator and the data protection team should agree the retention rule, and the operations team should verify that backups inherit it. Confirm exact report content and retention options against the Moodle 5.2 or later documentation for your version.

How do we control Bedrock spend and avoid runaway usage?

Cost comes from the per-token or per-image charges of the chosen models, so usage volume and model choice drive the bill more than the Moodle licence, which is free under GPL-3.0. Set AWS Budgets alerts on the account or on a tagged resource set, and turn on Cost Explorer reporting for the Bedrock service. Limit which Moodle actions and which courses can use AI, because the access controls described in Moodle's release notes reduce unplanned calls. Ask your AWS partner or internal finance team to quote expected volume from pilot data rather than from assumptions. The cloud finance owner sets budgets, and the Moodle administrator controls placements. Quota increases and throttling limits are set per account and region in AWS, so confirm current values in your account.

What should we check after a Moodle point release changes AI behavior?

Run a regression pass in a staging copy before you apply any point release, because AI placements, provider settings and the Bedrock plugin can change behavior even when core upgrades look routine. Moodle ships point releases every two months, so build the test into your change calendar. Check that each placement still calls the model you approved, that image generation still works, that the IAM role still has the permissions it needs, and that the logs and reports still record what your policy requires. Keep a rollback plan that includes a database backup taken before the upgrade. The Moodle administrator and platform team share the work, and the security team signs off on any change to permissions or logging.

Who owns each risk control when Moodle calls Bedrock?

Ownership is split across four groups: the cloud team owns the IAM roles, region, model access and logging configuration; the Moodle administrator owns provider settings, placements and access controls; the data protection team owns retention and the decision about what personal data may be sent; and the finance owner owns budgets and alerts. Write this split into a responsibility matrix before go-live, and name a person for each row. Review the matrix after each Moodle release and after any change to models or regions. An external partner can help set up and document these controls, but the controls and their evidence stay under your organization's governance.

Limits to confirm in your environment

The Bedrock provider depends on choices that AWS and Moodle control, not your team. Each item below is a limit that can change the design, so confirm it against current documentation and your target release before the build starts. Together they decide which models you can use, where traffic goes and whether the site can handle its load.

Models enabled in your region

Foundation models are not available in every AWS region, and access to a given model may need to be requested in your account before it appears. Check that each model you plan to assign to a Moodle action is enabled in the exact region you configure. A model that works in one region can be absent in another, so list the models per action and confirm each one in the region you will use, not a neighbouring one.

Bedrock provider strings

Image generation for your chosen models

The provider selects models for image generation from the foundation models Bedrock supports, but not every model offers image output. Confirm that the specific model you intend to use for the editor's image action produces images and is enabled in your region. Test one generation request end to end before you plan the placement, since a text model cannot fill the image role.

Plugin compatibility with your Moodle build

The AWS Bedrock provider ships with AI features in Moodle 5.2 or later, but any third-party AI or related plugin you add must declare support for your exact release. Check the plugin's version listing against the Moodle build you run, and note any dependency on other AI subsystem plugins. Record the plugin version in your change log so an upgrade does not silently break the connection.

PHP and database versions for your target release

Each Moodle release sets its own minimum PHP and database versions, and the requirement rises between releases. Moodle 5.1 requires 64-bit PHP 8.2 or later, while Moodle 5.3 requires 64-bit PHP 8.3 or later and PostgreSQL 17. If you plan to move beyond 5.2 during the same project, confirm the target release's requirements in its release notes and upgrade the stack first.

Moodle 5.3 notes

Account quotas for expected load

Bedrock enforces quotas on request rates and tokens per account and per model, and these limits differ by model and region. Estimate how many AI actions your courses will trigger at peak, such as many students using course assistance in the same hour, and compare that with the quotas shown for your account. Ask AWS whether a quota increase is needed and how long it takes before you enable placements for large cohorts.

IAM permissions and private network paths

The credentials Moodle uses need permission to invoke only the models you approved, and nothing broader. Confirm the IAM policy scope, the region in the endpoint, and whether your VPC has a private route to the Bedrock runtime if you want traffic to stay inside AWS. Check these with the AWS IAM and Bedrock documentation, and test that a denied model fails cleanly in Moodle rather than exposing an error to students.

What drives cost and effort for this setup

The largest recurring cost in this setup is AWS usage charges for model invocations, and AWS bills those directly to your account. DeployOpen does not resell Bedrock capacity, so a quote covers only the implementation work. Your own finance team should model invocation volume per action (summaries in course assistance, text generation in the editor, and any image generation) against the Bedrock pricing for each foundation model you select. Confirm the pricing with AWS for your region, since model availability and rates differ, and ask whether your agreement includes any committed spend or quotas that affect the budget.

The one-time effort falls into three areas. The first is IAM and network work: creating a dedicated IAM principal with only the Bedrock permissions the provider needs, deciding how credentials are stored and rotated, and confirming the region and endpoint path so traffic stays inside your AWS environment. The second is policy and design work: deciding which actions use which model, and agreeing the AI user policy with your academic integrity and data protection teams. The third is testing per action, because each enabled placement needs its own check of output quality, latency and error handling. Ask the quote to list these as separate line items so you can see where the hours go.

Recurring effort is smaller but continuous. Someone must watch invocation metrics and error rates, review usage reports, and re-test when Moodle or the AWS Bedrock provider changes, or when AWS retires or replaces a model you rely on. Each model change means re-running the per-action tests. Ask any proposal to state whether monitoring, model change testing and credential rotation are included in a retainer or billed as separate work, what response times apply to a broken AI placement, and who is responsible for AWS account billing alerts. Confirm these answers in writing before the scope is signed.

Questions buyers ask before connecting Bedrock to Moodle

Can our team connect Moodle to AWS Bedrock without outside help?

Yes, if you have someone who can administer Moodle, manage AWS IAM and configure a web server, and your team has time to test every AI placement before users see it. The work is mostly configuration rather than custom code, but it touches three areas that often sit with different people: the Moodle site, the AWS account and the network path between them. Most teams that struggle do so on the AWS side, where model access, region and credential scope need to match what Moodle is set to call. A partner is useful when you want the setup reviewed against your data handling rules and tested before a pilot.

What do we need to provide for a Bedrock connection?

Plan to provide four things before work starts:

  • Access to the Moodle administrator account and the server or hosting environment that runs the site
  • An AWS account where you can create or review IAM credentials and confirm which foundation models are enabled in the chosen region
  • Network contacts who can confirm outbound routing from the Moodle servers to Bedrock endpoints
  • A named AI policy owner who decides which actions are enabled, which courses are in scope and what students and staff are told

Without the policy owner, the technical setup can finish while the decisions that matter most remain open.

How long does a Bedrock connection take?

Duration depends on scope more than on the connection itself. A single provider on one Moodle site, with a small number of actions and a test course, is a short configuration and verification exercise. Duration grows with the number of actions you want to route to different models, the number of AWS accounts or regions involved, the need for network changes, and the time your policy owner needs to approve each placement. Ask for a written plan that lists each action, the model chosen for it, the test steps and the sign-off points, because that plan is what makes a timeline meaningful.

What drives the cost of connecting Bedrock to Moodle?

Two cost types apply. The one-time cost covers planning, IAM and region setup, Moodle configuration, network checks and testing. The recurring cost is the usage you pay AWS for model calls, which depends on which models you choose for each action and how often people use the features. Model usage is billed by AWS under your own account, so ask for the pricing for the specific models you select rather than relying on general figures. Scope drives the one-time cost: more actions, more environments, stricter network controls and more testing each add effort. Ask any quote to separate these components.

Does image generation work with every Bedrock model?

No. Moodle's AWS Bedrock provider selects a model per action, including image generation, from the foundation models supported in Amazon Bedrock, so image generation depends on choosing a model that supports it in your region. Model availability also changes over time and differs by region, so check the current list in your AWS console before you set the action. Confirm that the image action works end to end in a test course, including how the generated image is stored and who can see it, because the editor placement may behave differently from the course assistance placement.

How does Bedrock compare with a self-hosted Ollama server for keeping data in-house?

Bedrock keeps traffic inside your AWS environment when you use private connectivity and a region you have chosen, but the models run as an AWS managed service, so your data leaves the Moodle server. A self-hosted Ollama server keeps prompts inside your own infrastructure, which may matter for stricter residency or sector rules, though you then carry the GPU sizing, model updates and capacity planning yourself. The right choice depends on which data your policy allows to leave your network, which models you need, and who will run the service. Confirm the data handling terms and model list for each option before deciding.

What should we check before Bedrock goes live for students?

Check four things in a test environment first: that each enabled action calls the intended model in the intended region, that the IAM credentials carry only the permissions Moodle needs, that the access controls restrict AI to the courses and roles you approved, and that the AI user policy is shown and recorded. Then review what is written to action logs and how long you keep them. Keep a short written record of these results so the policy owner can sign off on the same configuration that students will use.

How DeployOpen scopes and delivers Moodle AI on Bedrock

DeployOpen plans, implements and hands over Moodle AI with AWS Bedrock inside infrastructure you control, from a written scope agreed before work starts. We configure the provider, model choices, IAM access and placements so your compliance and security teams can review the setup in your own AWS environment.

How we scope

  • Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts
  • The written scope lists which Moodle AI actions go to Bedrock, the chosen models per action and the AWS regions in use
  • Scope also records whether image generation is in or out, and which AWS accounts, IAM roles and network paths are involved

How we build

  • We configure the Bedrock provider in your Moodle 5.2 or later site with credentials scoped to the models you approved
  • We test each enabled action in a staging site, including image generation where it is in scope, before any course uses it
  • We confirm that prompts and responses travel only through the AWS paths your network design allows, and document the results

How we hand over

  • You receive configuration records, the model-to-action mapping, IAM policy definitions and the network path documentation
  • Test results and a runbook for changing models, rotating credentials and disabling a placement are delivered with the build
  • Your administrators are walked through the settings so ongoing changes can be made by your own team

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers after handover
  • Retainers can cover Moodle point releases, provider updates and retesting when AWS model availability changes
  • Ask for the support scope, response expectations and upgrade handling in the written quote before you commit

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.