Web Content Lambda

We will now create a lambda function that generates the http content, dashboard list and dashboard & session embed urls for our sample page.
It initially returns HTML content with javascript function that makes an API Gateway calls to get dashboard list and embed urls.

  1. Launch Lambda and click Create function button.
    Make the following selections.
    Choose Author from scratch
    Function Name: QSEmbedSample
    Runtime: Python 3.8
    Execution role: Use an existing role
    Select QSEmbedRole from drop down. Click Create function
WCL
  1. Download the following package to your machine.
    Download Lambda Package

  2. From Code source section, click Upload from dropdown button and click .zip file.
    Click Upload button, select the zip file downloaded in last step and click Open followed by Save.

WCL
  1. Click Configuration > (General configuration > ) Edit.
    Increase Timeout value to 30 secs and click Save button.
WCL
  1. Click Environment variables > Edit.
    Add the following environment variables (Refer notepad for values).
    CognitoClientId
    CognitoDomainUrl
    RoleArn
    DashboardRegion
    AWS_DATA_PATH

    Click Save button.

WCL