Issue with Exporting ElastiCache Snapshot to S3 in the Same Region via CLI


Hello AWS Community,

I'm experiencing an issue while trying to export an ElastiCache snapshot to an S3 bucket, both of which are located in the eu-west-1 region. I have successfully taken a backup of my ElastiCache instance and created a new S3 bucket in the same region for the purpose of exporting this backup.

To ensure proper access, I've added the necessary ACL(540804c33a284a299d2547575ce1010f2312ef3da9b3a053c8bc45bf233e4353) and provided 'List' and 'Write' permissions to objects within the bucket. The ACL for the bucket is set to 'Read' and 'Write'. However, when I attempt to export the backup to S3 using the AWS CLI with the following command:

aws elasticache copy-snapshot --source-snapshot-name dump --target-snapshot-name dump-test --target-bucket s3://

I encounter the following error:

An error occurred (InvalidParameterValue) when calling the CopySnapshot operation: The S3 bucket s3:// is outside of the current Region, eu-west-1. Snapshot must be exported to the same region.

This error perplexes me, especially since I can export the snapshot to the S3 bucket without any issues when using the AWS Management Console. Given that both the ElastiCache instance and the S3 bucket are in eu-west-1, I'm unsure why the CLI is reporting a region mismatch.

Has anyone else faced a similar issue or can offer insight into why this error might be occurring via the CLI, despite the console operations working as expected? Any guidance or suggestions to resolve this discrepancy would be greatly appreciated.

Thank you for your help!

2 Answers

@Riku_Kobayashi Thanks for the help. After burning 4-5 hrs I managed to find the issue. It should have mentioned in the document I was using

--target-bucket s3:// 

but the working command is


no need to add s3://

answered 16 days ago
profile picture
reviewed 16 days ago


How about adding "--region eu-west-1" to the command option?
As far as I can see from the following document, there seems to be no problem with the command itself.
By the way, you're not using ElastiCache serverless, right?
If you are using ElastiCache serverless, you must use "export-serverless-cache-snapshot".
I also recommend that you review your S3 settings just to be sure.

profile picture
answered 16 days ago
profile picture
reviewed 16 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions