Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws-ec2 Missing support for EC2 Windows Custom Images #3400

Closed
2 of 5 tasks
slipdexic opened this issue Jul 23, 2019 · 1 comment · Fixed by #3454
Closed
2 of 5 tasks

aws-ec2 Missing support for EC2 Windows Custom Images #3400

slipdexic opened this issue Jul 23, 2019 · 1 comment · Fixed by #3454

Comments

@slipdexic
Copy link
Contributor

slipdexic commented Jul 23, 2019

Note: for support questions, please first reference our documentation, then use Stackoverflow. This repository's issues are intended for feature requests and bug reports.

  • I'm submitting a ...

    • 🪲 bug report
    • 🚀 feature request
    • 📚 construct library gap
    • ☎️ security issue or vulnerability => Please see policy
    • ❓ support request => Please see note at the top of this template.
  • What is the current behaviour?
    Currently when creating an EC2 machine from an image you can only create a Windows server
    by selecting the Windows version the AMI this then looked up using the values published to the SSM parameter store. this actical explains how that works.
    https://aws.amazon.com/blogs/mt/query-for-the-latest-windows-ami-using-systems-manager-parameter-store/

Example Below

// Pick a Windows edition to use
const windows = new ec2.WindowsImage(ec2.WindowsVersion.WINDOWS_SERVER_2019_ENGLISH_FULL_BASE);

but for Linux you you have the choice of:

const amznLinux = new ec2.AmazonLinuxImage({
  generation: ec2.AmazonLinuxGeneration.AMAZON_LINUX,
  edition: ec2.AmazonLinuxEdition.STANDARD,
  virtualization: ec2.AmazonLinuxVirt.HVM,
  storage: ec2.AmazonLinuxStorage.GENERAL_PURPOSE,
});

or

// For other custom (Linux) images, instantiate a `GenericLinuxImage` with
// a map giving the AMI to in for each region:

const linux = new ec2.GenericLinuxImage({
    'us-east-1': 'ami-97785bed',
    'eu-west-1': 'ami-12345678',
    // ...
});
  • What is the expected behaviour (or behaviour of feature suggested)?
    Expand the feature to allow allow custom window image
    e.g.
// For other custom (Windows) images, instantiate a `GenericWindowImage` with
// a map giving the AMI to in for each region:

const windowsImage= new ec2.GenericWindowImage({
    'us-east-1': 'ami-97785bed',
    'eu-west-1': 'ami-12345678',
    // ...
});
  • What is the motivation / use case for changing the behaviour or adding this feature?

Due to the time it takes to build and a patch Windows environments install and install any necessary features etc. We create a custom AMI on a pipeline and then switch over in the ASG for Blue/ Green deployment.

Customs that are migrating system from Windows can not deploy any pre-built hardened/golden image/ or marketplace image via CDK,

  • Please tell us about your environment:

    • CDK CLI Version: 1.1.0
    • Module Version: xx.xx.xx
    • OS: [all ]
    • Language: [all ]
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. associated pull-request, stackoverflow, gitter, etc)

@slipdexic
Copy link
Contributor Author

Can I work on this feature my self an submit a pull request?

@slipdexic slipdexic changed the title Missing support for EC2 Windows Custom Images aws-ec2 Missing support for EC2 Windows Custom Images Aug 6, 2019
@mergify mergify bot closed this as completed in #3454 Aug 7, 2019
mergify bot pushed a commit that referenced this issue Aug 7, 2019
* feat(ec2): Use custom Windows AMI (#3400)
* Created new GenericWindowsImaeProps
* Created new Class GenericWindowsImage

* Add tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant