ec2.KeyPair how to label a generated Private Key? #30049
Unanswered
Cameronsplaze
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In the console, you can use the EC2 KeyPairs screen to find the ID and look up the private key in the Parameter store. How do you go the other direction? On the private key Parameter Store screen, how do you find which KeyPair / Stack it belongs to?
I deploy multiple of the same stack, and it's a pain to cross reference the list, instead of being able to populate the Description / Tags of the private key with this info (Or best yet, being able to give the private key a custom name that contains the stack it's deployed with. I'm guessing this is much harder though...)
Generate a Key Pair:
Some idea's I've tried:
I just learned about escape hatches, to try to override the Description to include the stack name:
https://docs.aws.amazon.com/cdk/v2/guide/cfn_layer.html#develop-customize-override
But that gives
AttributeError: 'NoneType' object has no attribute 'add_property_override'
.Printing the private key to the console gives
<jsii._reference_map.InterfaceDynamicProxy object at 0x7f8bf477dbb0>
, and not the normal CDK import class I'm used to, maybe that's a hint?Beta Was this translation helpful? Give feedback.
All reactions