- You will need to first make sure you have subscribed to the marketplace product
- Get the AMI of the marketplace
- Copy the script to machine
awsume
(or otherwise authorize) to AWS- chmod the script to be executable if needed
chmod +x marketplace-ami-encryptor.sh
Usage ./marketplace-ami-encryptor.sh {region} {ami} {name}
Example: ./marketplace-ami-encryptor.sh us-east-1 ami-f6eed4e0 OpenVPN
This make take a few minutes. Output looks like
Creating instance from marketplace AMI ami-f6eed4e0
Waiting for instance i-0d3a37ce1eb4b3f24 to be running and status OK...
Creating encrypted image
Waiting for AMI ami-01bfa37a, to be available...
Terminating unencrypted instance...
Everything is good! Your new AMI 'OpenVPN Encrypted' is available as ami-01bfa37a