 3. Download the [Customers.cshtml](Customers.cshtml) file and copy its content to the newly created **Customers.cshtml**. Repeat the step for the [Customers.cshtml.cs](Customers.cshtml.cs) file too. Both files are also accessible at the *lab-4-alltogether* directory in the repo.
 
4. Execute ```aws apigateway get-rest-apis --query 'items[*].{name:name,restApiId:id}'``` and search for the result that contains **-CustomerList** in its the name.
5. Open the **Customers.cshtml**. Go to line 40 and replace the **restApiId** value (obtained on the previous step). The excerpt below shows what to look for. Don't forget to replace the **awsRegion** with the aws region you are running the workshop.
 ```
 "ajax": {
 "url": "https://
3. Download the [Customers.cshtml](Customers.cshtml) file and copy its content to the newly created **Customers.cshtml**. Repeat the step for the [Customers.cshtml.cs](Customers.cshtml.cs) file too. Both files are also accessible at the *lab-4-alltogether* directory in the repo.
 
4. Execute ```aws apigateway get-rest-apis --query 'items[*].{name:name,restApiId:id}'``` and search for the result that contains **-CustomerList** in its the name.
5. Open the **Customers.cshtml**. Go to line 40 and replace the **restApiId** value (obtained on the previous step). The excerpt below shows what to look for. Don't forget to replace the **awsRegion** with the aws region you are running the workshop.
 ```
 "ajax": {
 "url": "https://@ViewData["Token"]
@ViewData["Message"]
``` 8. Compiles the new code to create the binaries that will be deployed. ``` dotnet publish -c Release ``` 9. Execute the following command: :notebook: **Note**: The [Support Commands Page](/SupportCommands.md) provides a list of useful commands that helps you identify the resources' names created during the labs executions;like the Amazon S3 bucked required for deployment. ```bash dotnet lambda deploy-serverless --template serverless.template --s3-bucket 4. Access the **Customers** page that calls the Customer List microservices by adding Customers at the URL:
 ```
 https://
4. Access the **Customers** page that calls the Customer List microservices by adding Customers at the URL:
 ```
 https:// ## Step 3: Testing the Microservices API Authentication using an API testing tool
In this step, we will access the DotNet CustomerList API directly to show how the API Authentication works. In the example below the tool utilized is [Postman](https://www.getpostman.com/)
1. Obtain the restApiId for the CustomerList microservices by executing ```aws apigateway get-rest-apis --query 'items[*].{name:name,restApiId:id}'``` and copy the **restApiId** that contains **-CustomerList** in the name.
2. From the AspNetCoreWebApp page (https://*restApiId*.execute-api.*awsRegion*.amazonaws.com/Prod/) copy the token from the initial page.
## Step 3: Testing the Microservices API Authentication using an API testing tool
In this step, we will access the DotNet CustomerList API directly to show how the API Authentication works. In the example below the tool utilized is [Postman](https://www.getpostman.com/)
1. Obtain the restApiId for the CustomerList microservices by executing ```aws apigateway get-rest-apis --query 'items[*].{name:name,restApiId:id}'``` and copy the **restApiId** that contains **-CustomerList** in the name.
2. From the AspNetCoreWebApp page (https://*restApiId*.execute-api.*awsRegion*.amazonaws.com/Prod/) copy the token from the initial page.
 3. Open the API tool of your choice and paste the https://*restApiId*.execute-api.*awsRegion*.amazonaws.com/v1 with the method **GET** and send the request. As the call hasn't provided any identity token, the result is an **Unauthorized** message.
3. Open the API tool of your choice and paste the https://*restApiId*.execute-api.*awsRegion*.amazonaws.com/v1 with the method **GET** and send the request. As the call hasn't provided any identity token, the result is an **Unauthorized** message.
 4. At this time, add a header key/pair value for authentication. Add a key called **Authorization** and its value being the **identity token** copied at step 3.6. When you submit the call, the result will be the json file with all the customer's information.
4. At this time, add a header key/pair value for authentication. Add a key called **Authorization** and its value being the **identity token** copied at step 3.6. When you submit the call, the result will be the json file with all the customer's information.
 ***You have now completed this Lab and can move onto [Lab 5](../lab-5-xray/).***
***You have now completed this Lab and can move onto [Lab 5](../lab-5-xray/).***