Why the Strapi S3 upload provider needs updating for Strapi 5
If your team has moved, or is moving, a Strapi project from v4 to Strapi 5 and media uploads or file URLs now fail against S3, the provider configuration is the most likely cause. In Strapi 5 the Amazon S3 provider uses AWS SDK v3, so the options that sat directly under providerOptions in v4 move under an s3Options object, and the access keys move into a credentials object. A configuration that worked on v4 will not be read correctly on Strapi 5 until you change its shape. Strapi's breaking change notes for the S3 provider describe the new structure and should be your reference for the exact keys.
Follow the supported order. First run the Strapi upgrade tool and the data migration that runs on first start of Strapi 5, after taking a database backup, since the migration docs state that downgrading is not supported. Strapi v4 reached end of life on April 30, 2026, which is one reason many teams are moving now. Only then correct the provider configuration in your plugin config file. Changing the S3 block before the upgrade is not useful, because the v4 code path will not read it. Confirm with your own environment which Strapi 5 version and Node.js release you are targeting, since the installation docs define the supported Node.js versions.
After the configuration change, re-check the parts of the stack that the provider depends on, not just the upload call. Confirm the bucket name, region, and the IAM permissions for the keys in credentials, including any ListBucket and object write permissions your uploads need. If you serve media through a CDN, check that the base URL and any origin settings still point to the same bucket and path. Review the security middleware and CORS settings for the admin and the front end, because a blocked request can look like an upload failure. Test an upload, a read through the public URL and a delete in staging before you change production.
Which S3 provider changes break uploads after the upgrade
This table lists the S3 provider changes in Strapi 5 that most often break media uploads, with the symptom to look for and the action to take for each. Use it as a checklist against your v4 configuration, and confirm every exact key name against Strapi's breaking change page before you edit anything.
| Change | Impact after upgrade | Action needed |
|---|---|---|
| Provider moves to AWS SDK v3 | Uploads or deletes fail, or the provider does not load at start-up, if v4 SDK-era code or dependencies remain | Update the S3 provider package for Strapi 5 and remove v4-only dependencies from the project |
| Options move under s3Options | Bucket and region settings are ignored, so uploads go to the wrong place or fail with errors at start-up | Nest the v4 options under an s3Options object in config/plugins and confirm each key name on the official page |
| Credentials move into a credentials object | Authentication errors on upload, or media writes fail with access denied responses | Move accessKeyId and secretAccessKey into a credentials object and load them from environment variables |
| Direct providerOptions keys removed | Old flat keys are no longer read, so the provider falls back to defaults or fails to initialize | Delete flat v4 keys from providerOptions after moving them, and check the config for leftovers |
| Public URLs and CDN base path | Media URLs in API responses point to the old host or are missing, so images render broken on the front end | Re-check the base URL and CDN settings after the upgrade and test a few uploaded assets end to end |
| Bucket policy and CORS | Browser uploads from the admin panel or direct reads fail with 403 or CORS errors | Review bucket policy, public read rules and CORS for the admin and front-end origins |
| Security middleware and CSP | Images or media from the bucket are blocked by content security policy or security headers | Add the bucket and CDN hosts to the img-src and connect-src rules used by Strapi's security middleware |
| Upload size and file type limits | Large or unusual files are rejected after the upgrade even though they worked on v4 | Compare limits in the upload plugin config with v4 values and test representative file sizes |
What to inventory and back up before changing the S3 config
Most failed media upload fixes after a Strapi 5 upgrade start with a missing record of how v4 was configured. The four items below give you a rollback point, a list of every setting you are about to move, the permissions the upload path depends on, and a place to test uploads without touching production media.
Database backup before the upgrade
Take a full database backup before you change any provider configuration, because the Strapi 5 data migration runs on first start and downgrading is not supported. Media metadata in the database stores file URLs, providers and folder records, so a clean restore point is what lets you undo a bad upload configuration without guessing. Confirm the backup restores to a separate instance and that you can read the file records in it. The restore test matters more than the backup file itself.
Migration FAQInventory of every v4 S3 setting
Export the current providerOptions block from config/plugins.js and record each value: region, bucket, endpoint, ACL, path style, and any params such as cache control. Note whether the endpoint points to AWS, MinIO, Ceph or another S3-compatible service, because that choice changes how path style and endpoint values behave. Store this list with the upgrade ticket so the Strapi 5 config is checked against it line by line.
IAM permissions used by the Strapi role
List the IAM actions the Strapi credentials currently use on the bucket, such as putting objects, getting objects, deleting objects and listing the bucket, along with any condition keys tied to the prefix or ACL. Confirm whether the same role also writes thumbnails or formats into a prefix. Upgrades sometimes expose permissions that were never needed before, so compare this list with the policy you apply during the change. Ask your cloud team to review the policy document, not a summary of it.
Staging bucket for upload tests
Create a test bucket or a staging prefix that mirrors production settings, including the same region, encryption setting, and public access block. Point a staging Strapi 5 instance at it and upload an image, a video, a PDF and a file with an unusual name, then check that each URL resolves and that deletes remove the object. Keep production media out of these tests, since a misconfigured delete can remove live assets. Ask your platform team who owns the staging bucket and how it is cleaned up after testing.
Current CDN and bucket policy snapshot
Record the CDN origin, cache behavior, signed URL settings, and the bucket policy or ACL configuration that serves public media. A Strapi 5 change can alter the URLs or headers returned for files, so a cached old URL or a changed origin path can break images on the front end even when uploads succeed. Export the CloudFront or equivalent distribution settings and the bucket policy JSON before editing anything, so you can compare them after the change.
How the provider configuration moves to s3Options and credentials
In Strapi 4, the S3 provider settings sat directly under providerOptions in config/plugins.js, next to the bucket, region and access keys. In Strapi 5, the provider uses AWS SDK v3, so the settings are regrouped: bucket and region options move under an s3Options object, and the access keys move into a nested credentials object. The practical effect is that a flat v4 block will not map one-to-one onto the new shape, and a value left in the old position may be ignored without an obvious error. Start by rewriting the upload block by hand, then check each key against the breaking change page for Amazon S3 provider credentials linked below, which lists the current structure. Confirm the exact option names against the provider's current documentation as well, because the SDK v3 option names are the ones that matter at runtime.
The configuration file must never hold live access keys in plain text. Once the block is rewritten, read the accessKeyId and secretAccessKey values from environment variables, or from the secrets store your platform uses, and keep the config file free of literal keys. Add the variable names to your deployment manifests and to your CI/CD secret settings, and confirm that no previous v4 commit still contains the keys. If a key has ever been committed, rotate it at the cloud provider and treat the old value as exposed. Also decide which IAM identity the variables represent and make sure its policy covers only the bucket and actions the upload provider needs.
Before you deploy, compare the rewritten file with the v4 original side by side and list every key you removed, moved or renamed. Run a test upload and a test read in a staging environment that uses the same bucket and region as production, because a misplaced region key often shows up only when the first request is made. Keep the v4 file in version control so the change is reviewable and reversible. Ask whoever owns the bucket to confirm the region and endpoint values, since these are the ones most often copied from an outdated example.
Steps to fix S3 uploads after the Strapi 5 upgrade
This sequence restores media uploads on a Strapi 5 project that uses the Amazon S3 provider, moving from a backed-up copy through configuration, a staging test, and a review of the bucket, CDN and security settings. Each step ends with a check you can confirm before moving on.
Back up and confirm the upgrade on a copy
Before changing anything, take a backup of the database and the code as they stood before the upgrade, and store it where it can be restored. Strapi does not support downgrading, so this backup is your only route back. Then run the upgraded project against a copy of the data and confirm the Strapi 5 data migration has finished and the admin panel loads. Checkpoint: the copy starts cleanly and the migration log shows no errors. Rollback: if the copy fails, stop here, restore the pre-upgrade backup to a clean environment, and work from there rather than patching production.
Move provider options under s3Options and credentials
In the upload plugin configuration, the Amazon S3 provider in Strapi 5 uses the AWS SDK v3, so the settings that sat directly under providerOptions in v4 now belong in an s3Options object, with access keys in a credentials object. The developer making the change should compare the config file against Strapi's breaking change note for the S3 provider and rename each key. Checkpoint: the config file contains no leftover v4-style keys at the top of providerOptions, and the project still starts. Rollback: revert only the config file in version control to the pre-upgrade commit, keeping the upgraded dependencies on a branch.
Confirm the AWS SDK v3 dependency resolves
Check the installed provider package and its lockfile so that the AWS SDK v3 client packages resolve to a single version and are not pulled in twice. A developer should run a clean install in the staging environment and inspect the dependency tree for the provider. Duplicate or missing SDK packages usually appear as startup errors or as failed uploads with credential or module-not-found messages. Checkpoint: a clean install completes and the provider loads without module errors in the server log. Rollback: restore the previous lockfile and reinstall, then retest against the backup copy.
Test upload, file URL read and delete in staging
In a staging environment that points at a test bucket, upload one file through the media library and through the API, then open the stored file URL in a browser and confirm the object is served. Finally, delete the file and confirm that the object is removed from the bucket. Keep the test to one file so that any failure is easy to trace. Checkpoint: all three actions succeed and the bucket shows the expected object and its removal. Rollback: if any action fails, revert the provider configuration to the step 2 state and re-run the test against the backup copy before changing bucket settings.
Re-check the bucket policy and CORS
Review the bucket policy and the CORS configuration on the bucket against what the upgraded project needs: the Strapi server must be allowed to write, read and delete objects, and the admin panel origin must be allowed for the methods the media library uses. Make these changes with the bucket owner or cloud administrator, and keep a copy of the previous policy and CORS JSON. Checkpoint: the staging test from the previous step passes again from the admin panel, not only from the API, and no permission error appears in the browser console. Rollback: reapply the saved policy and CORS documents, which take effect without restarting Strapi.
Check CDN origin and cache behavior
If the public media URLs pass through a CDN, confirm that its origin still points at the correct bucket or bucket endpoint, that the host name in Strapi's media URLs matches what the CDN serves, and that cache rules do not keep stale responses for files replaced or deleted during testing. Ask your CDN operator to confirm the origin and invalidation process for your provider. Checkpoint: a file uploaded in staging loads through the CDN host, and a replaced file returns its new version after invalidation. Rollback: restore the previous origin or cache rule in the CDN console and purge the affected paths.
Review Strapi security middleware for media sources
Review the security middleware settings in the Strapi configuration, particularly the directives that control which image sources and connect sources the admin panel and front end may load. Add the bucket and CDN hosts used in staging to these allowlists only if they are needed, and keep the lists as narrow as possible. Confirm the change with a fresh admin panel session by viewing an uploaded image preview. Checkpoint: image previews render in the admin panel and the browser reports no blocked resources for media hosts. Rollback: revert the middleware change in version control and retest the preview, since a blocked source is often the cause of missing thumbnails.
What to re-check for bucket, CDN and middleware by hosting setup
When Strapi writes to S3 and browsers load files straight from the bucket, the upgrade changes little on the AWS side, but the Strapi configuration and the bucket must agree on how objects are read. After the provider moves to AWS SDK v3, confirm that the region, bucket name and credentials sit under the new structure, and that the bucket policy still allows the access pattern your editors and front ends rely on.
- Bucket policy: confirm the policy grants
s3:PutObjectands3:DeleteObjectto the Strapi role and, if objects are public,s3:GetObjectto the expected principals. - Public read or signed URLs: decide which model you use. Public read is simpler but exposes every object key, while signed URLs need the provider to generate links and an expiry you can justify.
- CORS configuration: confirm the allowed origins include the admin panel and any front end that fetches media, with the methods used by uploads.
- Block Public Access settings: check that the account and bucket settings match the chosen read model, since they can override the policy.
- Content security policy: add the bucket host to
img-srcandmedia-srcin the middleware settings so images and video load.
Ask your AWS account team or cloud administrator to confirm bucket policies and Block Public Access settings in writing, since these may be governed by organization-wide controls.
When a CDN such as Amazon CloudFront serves media, the CDN origin becomes the public address for files, and the bucket is usually reachable only by the CDN. After the upgrade, the URLs Strapi generates must point at the CDN hostname, and the CDN must still be able to fetch objects from the bucket. A mismatch here often looks like broken images while uploads still succeed.
- CDN origin: confirm the origin points at the correct bucket and that the origin access control or origin access identity grants read access.
- Base URL setting: check that the provider's public URL setting uses the CDN hostname, not the raw bucket URL.
- CORS at the edge: confirm the CDN forwards the origin header and returns matching CORS headers for the front end.
- Cache invalidation: plan how cached responses for replaced or deleted files will be cleared after the upgrade.
- Content security policy: add the CDN hostname to
img-srcandmedia-src, and remove the raw bucket host if it is no longer used.
Confirm CDN distribution settings, origin access control and cache behavior with the team that owns the CDN account, because these changes may be managed outside the Strapi project.
When media is stored on S3-compatible object storage in your own data center or private cloud, the endpoint, addressing style and TLS configuration matter more than AWS-specific settings. The SDK v3 options must point at your endpoint, and the storage service must accept the addressing style Strapi sends. Confirm these details with the team that operates the storage platform rather than relying on AWS documentation.
- Endpoint setting: set the endpoint to the storage service URL your platform team publishes, including the correct port and scheme.
- Path-style addressing: confirm whether your storage requires path-style URLs, since some deployments do not support virtual-hosted-style bucket addressing.
- TLS and certificates: confirm the certificate chain is trusted by the Strapi host and any CDN or proxy in front of it.
- Bucket policy and access keys: confirm the access key has the write and delete rights Strapi needs and no broader administrative rights.
- Content security policy: add the storage host to
img-srcandmedia-src, using the same scheme and port that browsers will request.
Ask the storage operator to confirm endpoint, addressing style and key scope, and test a full upload, read and delete cycle from the Strapi host before go-live.
What makes the S3 fix take longer or shorter
This table lists the factors that change how much work the S3 provider fix involves and what to ask for in a quote. Read each row as a question to answer about your own project before requesting a fixed-scope estimate. The main takeaway is that media volume, custom upload code and access to the cloud account usually matter more than the provider configuration itself.
| Driver | Effect on the work | What to ask for in a quote |
|---|---|---|
| Number of media files | A large library raises the time for testing URL resolution and any migration of stored objects, even when the config change is small. | Count of files and total storage size, and whether the quote covers re-uploads or only config changes. |
| Re-upload or reference only | If existing files stay in the same bucket and keys, the fix is mostly configuration. Re-uploading or moving objects adds copy, verification and rollback steps. | A written choice between keeping existing objects in place and copying them, with the verification method for each. |
| Custom upload code calling the provider directly | Code that bypasses the upload provider must be found, rewritten for the v5 options shape and tested separately. | Inventory of custom upload paths, and whether they are included in scope. |
| Signed URLs and private buckets | Private buckets need signed URL behavior checked for each media type and expiry setting, which adds test cases. | Confirmation of bucket access model and the URL types the front end expects. |
| CDN layers and cache invalidation | A CDN in front of the bucket needs origin settings checked and sometimes cache invalidation, which depends on access to the CDN console. | Who performs invalidation, whether it is in scope, and how cached old URLs will be handled. |
| Number of environments | Each environment (development, staging, production) needs its own credentials, bucket settings and test pass. | Number of environments and whether the quote covers each one separately. |
| IAM policy complexity | Narrow IAM policies with separate read, write and delete rights take longer to design and verify than a single broad policy. | Written list of required S3 actions and who approves the policy. |
| Access to the cloud account | Without access to the bucket, CDN and IAM console, the work waits on client staff, which lengthens the schedule. | Named client contacts for cloud, CDN and security approvals, with agreed response expectations. |
How an upload travels from the admin panel to S3 and the CDN
An editor's file starts in the Strapi admin panel and passes to the upload provider, which reads the s3Options and credentials settings to write the object to the bucket. The end-user browser then fetches the file through the CDN, which sits in front of the bucket. The two trust boundaries to check are the bucket policy, which controls who can write and read objects, and the CORS rules, which control which browser origins can call the bucket directly.
Upload path from the admin panel through the provider to the bucket and CDN.
Questions teams ask before fixing S3 uploads after a Strapi 5 upgrade
How much does fixing the S3 upload provider after a Strapi 5 upgrade cost?
The cost depends on how much of the upload path has to change, not on the provider code alone. A fixed-scope quote is built from a written list of what is in scope, and the main cost drivers are the number of environments, how many custom upload settings exist, whether a CDN sits in front of the bucket, and how much testing your media flows need. Most of the work is one-time: rewriting the provider options, updating credentials handling, and retesting. Recurring cost appears only if you later add a retainer for upgrades or monitoring. Ask for the quote to list each environment, each media flow tested, and who performs the bucket and IAM changes.
How long does an S3 upload fix take after a Strapi 5 upgrade?
No single duration applies to every project, so treat any figure you see as a starting point to confirm. The length is driven by how many environments need the fix, whether bucket policies, CORS rules or CDN origins need changes that another team must approve, and how many content types and upload fields must be retested. Waiting on cloud account access or security review often costs more time than the code change. Ask for a timeline that separates code work, infrastructure changes, staging verification and production cutover, with each dependency named.
What does the S3 fix need from our team?
The work needs access and decisions from three groups: the cloud account owners, the application team and the security team. Typically this includes a role or account that can review the bucket, its public access settings and any CORS configuration, IAM permissions that the Strapi process uses, and a staging environment that mirrors production storage. Confirm who can approve IAM changes, whether credentials are stored in environment variables or a secrets manager, and how access will be removed after the work ends.
Can our in-house team fix S3 uploads alone?
Yes, a capable in-house team can make the change, because the core work is a documented configuration move. The official breaking change notes say that in Strapi 5 the Amazon S3 provider uses AWS SDK v3, so options move under an s3Options object and credentials move into a credentials object instead of sitting directly under providerOptions as in v4. The harder part is usually the surrounding AWS setup and verification. Decide early whether your team has someone who owns bucket policy, IAM and CDN behavior, and whether a partner should handle the testing or only the code review.
Can we downgrade to Strapi 4 if uploads break after the change?
Strapi's migration documentation says that downgrading is not supported, so the safe answer is to plan around that before the upgrade. Take a database backup before the upgrade, keep the pre-upgrade code and provider configuration in version control, and rehearse the restore on a copy. For media, confirm that your bucket keeps the original objects and that a rollback will not delete or overwrite them. If uploads fail, the usual first step is to correct the provider configuration on Strapi 5 in staging, not to revert the platform.
What changes if our media is served through a CDN?
A CDN adds steps because it caches, rewrites and sometimes signs the URLs that the S3 provider returns. After the upgrade, check the bucket or origin the CDN reads from, any cache rules tied to old paths, the public base URL that Strapi uses to build media links, and whether signed or private delivery is in use. Test both new uploads and existing assets, because a configuration that looks correct for new files can still serve stale or broken links for older ones. Also confirm that security middleware and allowed origins permit the CDN host.
Which security settings should we review after the S3 provider change?
Review the bucket's public access and object ownership settings, the IAM policy given to the Strapi process, the CORS rules for upload and read requests, and the Strapi security middleware that governs headers and allowed sources. Confirm that credentials are not committed to code and that only the actions the application needs are granted. Keep a record of each change so your security and compliance teams can review what was altered and why. Ask your provider which controls it has validated in your environment before go-live.
How to test uploads and roll back safely
Run a fixed upload test set on a staging copy of the upgraded project before any production change, because the S3 provider fix is only proven when every media path works end to end. Upload one sample of each file type your editors use, including images, PDFs, video and any other formats in your content types, and check that each lands in the bucket under the expected prefix with the expected object permissions. Then load each asset through the front end, using the URL the front end actually requests, and confirm it resolves through your CDN or public bucket endpoint. Delete a test file from the Media Library and confirm the object is removed from S3, not just from the database. Finally, pick several assets uploaded under Strapi 4 and confirm they still resolve. Old records carry URLs and provider metadata written by the v4 setup, so this check catches a provider configuration that breaks existing content even when new uploads work. Ask your team or partner to record the results per file type so a later change can be compared against them.
Plan the rollback before you start, because Strapi does not support downgrading after the upgrade runs. The official migration guidance says to back up the database first, and the practical rollback is restoring that pre-upgrade database together with the pre-upgrade code. Your pre-upgrade snapshot should therefore include the database dump, the project code at the commit you can redeploy, and the environment configuration that holds the provider settings. Confirm that the S3 bucket is not modified in a way that would prevent the old code from reading its objects. Avoid deleting or re-keying old objects as part of the fix, since a restored v4 project will still expect them at their original paths. Confirm with your team who can run the restore, how long the restore takes in your environment, and who signs off on returning to the old version. Validate the S3 fix only on a staging copy restored from a recent production backup, and do not promote it to production until the test set passes there. Review the Strapi v4 to v5 migration introduction and FAQ with your team before you choose the backup and restore method.
How DeployOpen scopes and delivers the S3 provider fix
This sequence turns a broken S3 upload path after a Strapi 5 upgrade into a written, tested configuration change with a record your team can review and reuse for later upgrades.
Agree a written scope
DeployOpen and your team agree in writing on the target Strapi 5 version, the environments to be changed and tested, and the boundaries of the work. The scope names who owns each decision, including who approves changes to production and who holds the bucket and CDN accounts. The step is done when both sides have signed off the scope document and the quote follows from it.
Inventory the current S3 configuration
DeployOpen reviews the existing upload provider settings, the plugin configuration file and any environment variables that feed them, then maps each value to its Strapi 5 location. The inventory records which options sit directly under the v4 provider options, which credentials are stored in code or environment files, and which settings depend on the bucket or CDN. The step is done when every setting has a documented old location, new location and owner.
Confirm bucket, CDN and access settings
Your cloud or storage administrators confirm the bucket name, region, public access policy, CORS rules, CDN origin and cache behavior, and the IAM identity used by the application. DeployOpen checks these against the new provider options so that uploads, reads and any signed URLs work under the same rules. The step is done when the administrators have confirmed each value in writing and any gaps are logged as open items.
Update the provider configuration
DeployOpen moves the options under the s3Options object and the credentials into the credentials object, following the Strapi 5 breaking change for the S3 provider, and removes the old keys. Secrets are read from the environment or your secret store rather than from committed files. The step is done when the change is committed to version control as a reviewable diff and the team has reviewed it.
Test uploads in staging
DeployOpen tests the change in a staging environment that mirrors production's Strapi version, bucket and CDN path. Tests cover uploading new media, replacing and deleting files, reading images through the CDN, and checking that content security and header settings still allow media to load in the admin panel and on front ends. The step is done when every test case has a recorded pass or a logged defect with a fix.
Deploy and verify in production
Your team deploys the reviewed change to production using its normal release process, and DeployOpen runs a short set of smoke checks against the live bucket and CDN, including one upload and one read from each front end. Rollback steps are agreed before the change ships. The step is done when the smoke checks pass and the team confirms uploads work for editors and end users.
Document the result and handover
DeployOpen delivers a written record covering the final configuration (with secrets removed), the test results, the open items and the rollback steps, so your engineers can operate the setup without the original work. The record also lists the settings to recheck at the next upgrade. The step is done when your team accepts the document and it is stored with the project's other operations records.
Continue support through a retainer
For later Strapi 5 minor or patch upgrades, or any change to storage or CDN settings, DeployOpen can continue under a retainer that covers re-testing the upload path against the new release. Ask for the retainer scope in writing, including which environments and which upgrade types it covers. The step is done when the retainer scope is agreed and the next upgrade test is scheduled.

