An independent guide to building modern software for serverless and native cloud

Getting the Code

Quick Start Guide

This is the first of four Quick Start Guides for the .Net Serverless variant of the Connected Car solution. This document will step you through getting the code for this variant cloned on your workstation.

The Github Repositories

For this variant there are three Github code repositories that you can clone to your local workstation. Here's an outline of what's in these repositories:

The Serverless Repository

https://github.com/johngrantham/aws-connectedcar-dotnet-serverless

Technically, if you just want to deploy this code variant to AWS, this is the only repository you need. This repository contains the source code for the C# Lambdas used by the three APIs, along with references to Github packages that contain the core libraries called by these Lambdas. This repository also contains the CloudFormation templates, OpenAPI documents, and scripts that you can use to deploy the solution from the command line, as well as a demonstration pipeline.

The Core Repository

https://github.com/johngrantham/aws-connectedcar-dotnet-core

This repository contains all the shared data classes, service components, and utilities that are referenced by the Lambdas in the serverless repository. There are two Github packages that are compiled from the code in this repository, and these are what are referenced by other projects. As a result, you don't need this core repository to build or deploy this code variant. It's still good to clone it on your workstation, however, to explore the code.

The Common Repository

https://github.com/johngrantham/aws-connectedcar-common

This third repository contains the scripts, Postman collections, and CodeBuild artifacts that are common to all the AWS variants of the Connected Car solution. You can clone this to your workstation to access the example scripts and test collections used in the Learning AWS Serverless course.

Setting up your Workstation

There are two tools that you need to have installed on your workstation before you can clone the three repositories. The first is VS Code, and the second is the GIT command line tool. You can find information about setting up these two tools in one of these support documents, depending on your workstation platform:

Setting up your MacOS Workstation

Setting up your Windows Workstation

Note that you don't have to fully set up your workstation as outlined in the above documents if you only want to clone the repositories and explore the code. You only need VS Code and GIT.

Cloning the Repositories

Once you have VS Code and GIT installed, you can start to clone the Github repositories. We'll go through the steps in sequence for the serverless repository, starting with getting the URL. For this, click on the link below for the repository:

https://github.com/johngrantham/aws-connectedcar-dotnet-serverless

Once you have the page for this repository open, click on the green "Code" button at the top right, then click the copy icon that's to the right of the "HTTPS" URL in the popup panel, as shown below:

Next, open VS Code, select the source control icon on the left, and click the "Clone Repository" button. You'll then see the entry field and the "Clone from Github" option highlighted in the command palette, as shown below:

Paste the URL you previously copied from Github into the command palette, and press enter. You'll be prompted by VS Code for the target folder on your workstation for the cloned repository. Once you have selected a folder, the code will be cloned. You'll then be asked if you want to open this repository in VS Code. Once you click "yes" to this, you'll see the contents of this repository, as below:

To get the rest of the code, simply repeat this process for the other two repositories:

https://github.com/johngrantham/aws-connectedcar-dotnet-core

https://github.com/johngrantham/aws-connectedcar-common

Once you've cloned all three repositories you can move on to the "Explore the Code" document linked below, which will outline the content of the folders for each.