Run the Lambda Function - AWS SDK for JavaScript

The AWS SDK for JavaScript version 3 (v3) is a rewrite of v2 with some great new features, including modular architecture. For more information, see the AWS SDK for JavaScript v3 Developer Guide.

Run the Lambda Function

In this task, you run the application.

To run the browser application

  1. Open a web browser.

  2. Open the index.html in the Amazon S3 bucket that hosts the application.

    Note

    To do this, go open the Amazon S3 bucket in the AWS console, select the bucket, and select the Object URL.

    
          Slot machine web application running in a browser that invokes a Lambda
            function
  3. Select the handle on the right side of the slot machine. The wheels begin to spin as the browser script invokes the Lambda function to generate results for this turn.

    
          Web application running in a browser that invokes a Lambda function.
  4. Once the Lambda function returns the spin results to the browser script, the browser script sets the game display to show the images that the Lambda function selected.

  5. Select the handle again to start another spin.

Tutorial Clean Up

To avoid ongoing charges for the resources and services used in this tutorial, delete the following resources in their respective service consoles:

Congratulations! You have now finished the tutorial.