-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(ec2): support creating key pairs #28138
Conversation
2c8fcda
to
62d8368
Compare
@kylelaker how can I use it locally before they merge it? |
@AllanOricil The const keyPair = new ec2.CfnKeyPair(this, 'KeyPair', {
KeyName: "A-NAME-FOR-KEY",
});
const keyName = keyPair.ref; And you can pass |
@kylelaker thank you! That is exactly what I used! I love cdk! |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
This adds support for creating `AWS::EC2::KeyPair` resources. These are added as a property to `Instance`, `LaunchTemplate`, and `NatInstance` and the older `keyName` prop is deprecated in favor of the new `keyPair: IKeyPair` property. A getter is added to retrieve the SSM parameter that hold the private key for non-imported keys and checks are added to make sure that ED25519 keys are not used with a Windows instance. Closes aws#5252. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This adds support for creating
AWS::EC2::KeyPair
resources. These are added as a property toInstance
,LaunchTemplate
, andNatInstance
and the olderkeyName
prop is deprecated in favor of the newkeyPair: IKeyPair
property.A getter is added to retrieve the SSM parameter that hold the private key for non-imported keys and checks are added to make sure that ED25519 keys are not used with a Windows instance.
Closes #5252.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license