-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
@aws-cdk/aws-ec2Related to Amazon Elastic Compute CloudRelated to Amazon Elastic Compute Cloudeffort/largeLarge work item – several weeks of effortLarge work item – several weeks of effortfeature-requestA feature should be added or improved.A feature should be added or improved.needs-cfnThis issue is waiting on changes to CloudFormation before it can be addressed.This issue is waiting on changes to CloudFormation before it can be addressed.p1
Description
Please add the ability to create EC2 key pairs via CDK.
Use Case
I would like not to have to interact with AWS Console at all.
Want my keys git-versioned and manageable from CDK.
Proposed Solution
key = aws_ec2.KeyPair(
key_name="autoscaled",
public_key="ssh-rsa AAAABBBBBCCC...",
)
Other
Couldn't find a way how to do that in documentation. I believe this is not doable with CDK right now.
Seems the only way is to manually add key-pair via web Console and use key_name
string parameter for the EC2 machine:
https://stackoverflow.com/questions/57572065/how-can-i-access-an-ec2-instance-created-by-cdk
- 👋 I may be able to implement this feature request
-
⚠️ This feature might incur a breaking change
seraphjiang, gmarciani, ShreyaGangishetty, jonoirwinrsa, dbolotin and 43 moresjortiz, byongwu, dkwgit, SonNg2k and austinmw
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-ec2Related to Amazon Elastic Compute CloudRelated to Amazon Elastic Compute Cloudeffort/largeLarge work item – several weeks of effortLarge work item – several weeks of effortfeature-requestA feature should be added or improved.A feature should be added or improved.needs-cfnThis issue is waiting on changes to CloudFormation before it can be addressed.This issue is waiting on changes to CloudFormation before it can be addressed.p1