title: Can we dynamically create Keypair through AWS Cloudformation and copy the .PEM file to EC2 Linux instance
body: <p>My requirement is to create an EC2 instance which will have the Keypair created dynamically from the same Cloudformation template.As of now,I am creating the KeyPair from AWS console and assigning it to EC2 instance through Cloudformation by taking the input from the user.</p>
  
  <p>I have checked AWS document and found that the KeyPair can be create from AWS console.</p>
  
  <p>Is there anyway through which Keypair can be created from Cloudformation and copy the .PEM file in the instance.</p>