아래 AWS CLI 명령은 ElastiCache for Redis Backup 파일을 S3 버킷으로 백업을 받고 있는 상황이 조건입니다. 즉 S3 버킷과 Redis 간에 권한 설정이 완료된 이후에 가능합니다.

EC2에서 aws configure 설정을 먼저 진행하고 아래와 같이 명령을 사용할 수 있습니다.

/usr/local/bin/aws elasticache copy-snapshot \\
--source-snapshot-name automatic.moim-002-2022-05-01-19-00 \\
--target-snapshot-name moim-002-2022-05-01 \\
--target-bucket redis-backup

콘솔에서 백업을 수행하고 CLI 환경에서 다시 수행하면 아래와 같은 에러가 발생하니 참고 하세요. An error occurred (SnapshotAlreadyExistsFault) when calling the CopySnapshot operation: A destination snapshot with the specified name already exists

[참고문서]

https://docs.aws.amazon.com/ko_kr/AmazonElastiCache/latest/red-ug/backups-exporting.html