Dies wird in der Dokumentation beschrieben: Sharing an Amazon EBS Snapshot
Die Schritte aws CLI sind
- Ändern von Berechtigungen für Ihre Schnappschüsse
teilen privat zu übersetzen mit:
aws ec2 modify-snapshot-attribute \
--snapshot-id "snap-xxxxx" \
--create-volume-permission "{
\"Add\": [
{
\"UserId\": \"XXXXXXX\"
}
]
}"
Um p zu teilen ublicly:
aws ec2 modify-snapshot-attribute \
--snapshot-id "snap-xxxxx" \
--create-volume-permission "{
\"Add\": [
{
\"Group\": \"all\"
}
]
}"
Kopieren Sie den Snapshot
aws ec2 copy-snapshot \
--region "target-region"
--source-region "source" \
--source-snapshot-id "snap-xxxxx" \
--description "Example Description"
vorsichtig sein, nicht zu verwechseln mit destination-region
--destination-region (string)
The destination region to use in the PresignedUrl parameter of a
snapshot copy operation. This parameter is only valid for specifying
the destination region in a PresignedUrl parameter, where it is
required.
NOTE:
copy-snapshot sends the snapshot copy to the regional endpoint
that you send the HTTP request to, such as ec2.us-east-1.amazon-
aws.com (in the AWS CLI, this is specified with the --region
parameter or the default region in your AWS configuration file).