Developing lambdas - AWS SAM with VSCode and Linux: Difference between revisions

Jump to navigation Jump to search
no edit summary
(Created page with "= IN DEVELOPMENT = = Developing lambdas with AWS SAM, Linux, and VS Code = == Why this solution == When I first started to develop a lambda functions it was a small one. I...")
 
No edit summary
Line 18: Line 18:


And reasons for the Visual Studio Code? I love it, simply. I used to be a fan of VIM but VIM is just an editor, not a complete IDE. I found that the main benefit of Visual Studio Code lays in the number of available extensions, particularly in one I like most - Remote SSH development. It is so easy to connect your Visual Studio Code editor with Linux not mentioning you can very easily use an integrated terminal window for your Linux server in HyperV.
And reasons for the Visual Studio Code? I love it, simply. I used to be a fan of VIM but VIM is just an editor, not a complete IDE. I found that the main benefit of Visual Studio Code lays in the number of available extensions, particularly in one I like most - Remote SSH development. It is so easy to connect your Visual Studio Code editor with Linux not mentioning you can very easily use an integrated terminal window for your Linux server in HyperV.
== Let's start with installing Linux into HyperV ==
I prefer Ubuntu Linux. Because we are going to just use command line recommended distribution is [https://ubuntu.com/download/server Ubuntu Linux Server Edition 20.04]. For using HyperV the Windows 10 Pro edition is needed. You can install HyperV by simply searching "Programs and Features" in START Menu and clicking on "Turn Windows Features on and off" and selecting HyperV.
[[File:Features1.PNG]]
[[File:Features2.PNG]]
== Network settings ==
Default installation use default network. The trouble with default network in HyperV is that you are unable to connect to machine from host computer through IP. Only thing which is activated is NAT. I have tried to create only one internal network and install routing tools to Windows and route all traffic through NAT on hypervisor but the trouble was when using VPN service to company network. It just did not work. I was unable to connect to Cisco VPN. For this reason I am using two network cards, one use default HyperV NAT and second just internal network without internet access used only to access HyperV host.
[[File:Netcard1.PNG]]
[[File:Netcard2.PNG]]
[[File:Netcard3.PNG]]
When you are configuring second network adapter it is necessary to manually configure IP address. You can use any free network range, in my case I use 192.168.200.0/24 with hypervisor address 192.168.200.1 and host address 192.168.200.10. You should configure hypervisor address in network adapter settings in Windows and host IP address during Ubuntu installation (that's most convenient way).
[[File:Netsettings1.PNG]]
[[File:Netsettings2.PNG]]

Navigation menu