How to Create a AWS S3 Backup for Files and VMware ESXi VMs

This guide covers two AWS S3 backup workflows for offsite storage. Upload an existing backup file with the AWS CLI, or archive scheduled VMware ESXi backups and verify the recovery path.

Ivy

By Ivy Updated on November 30, 2026

Share this: instagram reddit

What’s your current situation? Are you just trying to push an existing backup file to the cloud, or do you need an ongoing backup plan for your ESXi VMs? Think about what you'd need to recover if your local system crashed. Pick the method that fits.

  • Just have a local backup file? Upload local backup file to Amazon S3 using AWS CLI, then download a test copy to verify it works.

  • Need recurring backups for a VMware ESXi VM? Create VMware backup automatically using AOMEI Cyber Backup and archive the versions directly to S3.

This guide focuses on using Amazon S3 as your offsite destination. (Already have data sitting in an S3 bucket? You can protect it with AWS Backup once you enable S3 Versioning on that bucket.)

What You Need Before Backing Up to Amazon S3

Identify the item you want to recover and the tool you’ll use to recover it. That decision determines what needs to go into the bucket and how you’ll verify the result.

🎯 Recover Target 🪣 What S3 Stores ✅ Recovery Verification
An existing file, such as a database .bak file A copy of the file under a specific object key Download the object and compare its SHA-256 hash with the original. Test it in the source application if you need to recover the data inside.
A VMware ESXi VM from a particular backup point A VM backup version archived by AOMEI Cyber Backup Select the archived version in the restore console and complete a test restore.

Have the destination bucket name, its AWS Region, and authorized access ready.

  • For CLI transfers, use a distinct object key for each backup you intend to keep. A date and time in the key make it easier to identify the right copy later.
  • For VM backups, also confirm that the local or network repository has enough space for the primary backup.

Method 1: Upload an Existing Backup File with the AWS CLI

When an application has already written a backup file to disk and finished writing to it, you can upload it with AWS CLI.

The example uses PowerShell on Windows and copies a .bak file to an existing bucket. Replace the example bucket name, local path, and object key with your own values.

Step 1. Open PowerShell and run aws --version. Confirm that the output starts with aws-cli/2.

Step 2. Run aws sso login with your configured profile, then follow the sign-in prompts in your browser. Replace backup-operator with your profile name. If your organization uses IAM Identity Center and you don’t have a profile yet, run aws configure sso first.

  • $profile = 'backup-operator'
  • aws sso login --profile "$profile"
  • aws sts get-caller-identity --profile "$profile"

Check that the returned account and role match the ones you intend to use. That role needs permission to upload and retrieve objects at the backup destination.

Step 3. Enter the full path to your backup file and choose where to store it in Amazon S3. Replace amzn-s3-demo-bucket with the name of an existing bucket you can access. The part after the bucket name is the object key, which identifies the backup in S3.

  • $source = 'C:\Backups\Accounting Full.bak'
  • $s3Uri = 's3://amzn-s3-demo-bucket/offsite/accounting/2026-11-25-0200/Accounting Full.bak'
  • Test-Path -LiteralPath $source -PathType Leaf

If Test-Path returns True, continue to the upload step. If it returns False, check the local file path and try again. Keep the same $s3Uri for the upload and the test download.

Step 4. Upload the completed backup file to the S3 destination. When the upload completes, record the S3 URI and backup date so you can locate the same copy later.

aws s3 cp "$source" "$s3Uri" --profile "$profile"

Step 5. Download the backup to a new folder so you can tell which copy you just downloaded.

  • $testDirectory = Join-Path $env:TEMP ("s3-restore-" + [guid]::NewGuid())
  • New-Item -ItemType Directory -Path $testDirectory | Out-Null
  • $testCopy = Join-Path $testDirectory 'Accounting Full.bak'
  • aws s3 cp "$s3Uri" "$testCopy" --profile "$profile"

The backup file should appear in the test folder. If you see AccessDenied, check that your AWS role can read the S3 object and, if it’s encrypted with AWS KMS, use the key to decrypt it.

Step 6. Compare the original and downloaded files using SHA-256.

Get-FileHash -Algorithm SHA256 -LiteralPath $source, $testCopy

The two hashes should match, confirming that the downloaded file matches the original. For a database backup, also restore the downloaded copy to a test database and check that the expected data is there.

Method 2: Archive VMware ESXi Backups to Amazon S3 with AOMEI Cyber Backup

Need to recover an entire VM? Try an enterprise backup solution like AOMEI Cyber Backup. It can schedule VM backups and automatically send a copy of those backup versions to Amazon S3. The task writes the primary backup to local storage or a NAS first, then uploads the archive.

This way, you can use the local copy for fast restores, or pull from the S3 copy if you need to recover from offsite storage.

AOMEI Cyber Backup
Centralized, Agentless Enterprise Data Backup Solution
  • Manage all your VMware backups from one console without installing agents in individual VMs.
  • Set up full, incremental, or differential backups to run automatically on your preferred schedule.
  • Support vSphere, ESXi, and vCenter from version 6.0 through 8.0.
  • Save backups to NAS, local drives, or external storage, and archive to Amazon S3.
  • Recover fast with instant recovery, granular recovery, and more.

If the VMware ESXi host isn’t listed in the console, add it first. Then create a backup task and enable archiving to Amazon S3.

Step 1. In the backup console, go to Source Device > VMware ESXi > Add VMware ESXI. Then, enter the corresponding IP address, username, password and click Confirm to add vCenter or Standalone ESXi.

Add ESXi

Step 2. Then, go to Target Storage > Amazon S3 > Add Target and enter the authorized credentials for the bucket. Click Confirm. 

Add Amazon S3

Step 3. Now, click Task > Backup > Create New Task to get started.

Create New Task

Step 4. From Backup Type section, select VMware ESXi Backup and enter a unique name to distinguish it from others.

Select VM ESXi Backup

 Step 5. Click Select + next to Device Name and select the VM you want to protect. Double-check your VM selection, especially if multiple hosts have VMs with similar names.

Select Virtual Machine

Step 6. Click Select + next to Target and choose a local repository or NAS outside the source datastore. 

Select Target

Step 7. Enable Archiving backup versions to Amazon S3, click Select, and choose the configured S3 target.

Enable Archiving Backup Versions to Amazon S3

Step 8. Optionally, click the current schedule settings to edit them and click Start Backup and select Add the backup and start backup now. Check the backup task list to monitor its progress.

Schedule Backup

⚠️Under Schedule, you can set Full, incremental, or differential Backup, choose the days you want the backup to run, and configure the Start Time. Alternatively, you can click individual days to change their backup method.

 Check the primary task for completion, then check Backup Archive separately to confirm the corresponding version finished uploading. If needed, run a test restore during an approved maintenance window. 

Conclusion

Judge your AWS S3 backup by what you can recover from it. For a standalone backup file, download the exact object and compare its hash with the original. For a VMware ESXi archive, select the intended backup version and verify that the recovered VM can start and serve its intended purpose.

Ivy
Ivy · Editor
Ivy, our dedicated editor at AOMEI Technology, is committed to providing valuable insights and guidance in data protection. Her mission is to empower everyone with her knowledge of computer backup and recovery, disk cloning, file synchronization, and more. Ivy's goal is to do her best to ensure your digital world remains safe and secure.