https://pulumi.com logo
Title
d

dry-answer-66872

08/16/2021, 8:44 AM
Hi All, I have followed along this tutorial "https://www.pulumi.com/docs/tutorials/aws/ec2-webserver/" I was able to create EC2 and able to see in AWS console and able to see the webserver running fine by hittinh in browser or curl The question I have is, how do I connect to that AWS box? It needs a private key and that is kinda missing here, not sure what needs to be done, could be trivial Could someone help me?
b

brave-planet-10645

08/16/2021, 9:01 AM
Hi there are a few of things you need to do: 1. Create a new keypair, passing in your public ssh key 2. Make sure your security group allows access over port 22 3. Attach your keypair to the EC2 instance by passing in the keyname
If you look at these lines of code you should see how to do it
d

dry-answer-66872

08/16/2021, 10:49 AM
Thank you Piers Let me follow the instructions from that link
@brave-planet-10645 I was following this https://github.com/pulumi/examples/blob/e259c9a21c8b686d8badcbeb6e7d8886a90c8816/aws-py-ec2-provisioners/__main__.py and I got an error as 'ModuleNotFoundError: No module named 'provisioners' and, we have python pip for provisioner (without 's') https://pypi.org/project/provisioner/ any clue that you could share?
d

dry-answer-66872

08/17/2021, 9:44 AM
@brave-planet-10645 I am sorry to bug you I got the instance created and al set but when I ssh to the server with ec2-user as the user ID, it says Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
b

brave-planet-10645

08/17/2021, 9:47 AM
Can you send your code to support@pulumi.com and I'll take a look
🙌 1
d

dry-answer-66872

08/17/2021, 9:48 AM
oh hold on my trivial mistake, I passed wrong rsa key I am all set now, thanks a lot @brave-planet-10645 for your support
b

brave-planet-10645

08/17/2021, 9:55 AM
Awesome! Glad it's working
👍 1