Using Skopeo
DESTINATION_URI=xxxxxxxxxxx.dkr.ecr.us-west-2.amazonaws.com/mongo:6
SOURCE_URI=docker.io/mongo:6
AWS_PROFILE=profilename
# Login skopeo to your registry
aws ecr get-login-password --profile=${AWS_PROFILE} | skopeo login -u AWS --password-stdin $(echo $DESTINATION_URI | cut -f 1 -d '/')
# Login your docker to your registry
aws ecr get-login-password --profile=${AWS_PROFILE} | docker login --username AWS --password-stdin $(echo $DESTINATION_URI | cut -f 1 -d '/')
# copy the image
skopeo copy --multi-arch all "docker://${SOURCE_URI}" "docker://${DESTINATION_URI}"
# inspect the image
docker buildx imagetools inspect ${DESTINATION_URI}