does anyone know if it is possible to launch Marketplace AMIs (in this case an OpenVPN Server), via Cloudformation and if so how? I didn't find anything helpful in the AWS Docs / OpenVPN Docs.
Asked
Active
Viewed 1,062 times
1 Answers
4
I just do a quick test with this template and CloudFormation runs without error. Note that, my region is Singapore, I think you need to replace the ImageId
of your region.
To get the ImageId, you need to launch an EC2 instance with the image in the console. From there you can copy the ImageId.
Those might be helpful: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/quickref-ec2.html https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html
Resources:
EC2Instance:
Type: AWS::EC2::Instance
Properties:
ImageId: ami-0a8fdce33ca9cbe51 #ap-southeast-1
KeyName: testkey
InstanceType: t2.small
SubnetId: subnet-035***095
SecurityGroupIds:
- sg-03f***356
BlockDeviceMappings:
-
DeviceName: /dev/sda1
Ebs:
VolumeSize: 8

Robert Kossendey
- 6,733
- 2
- 12
- 42

Franxi Hidro
- 505
- 4
- 18
-
So which image is that? I'm not able to finde the ImageIds of Marketplace AMIs.. – Robert Kossendey Dec 16 '20 at 13:43
-
1You are right, I created an EC2 to get the ImageId then add it in the template. – Franxi Hidro Dec 16 '20 at 13:45