• This repository has been archived on 09/Jul/2020
  • Stars
    star
    659
  • Rank 67,948 (Top 2 %)
  • Language
    JavaScript
  • License
    Apache License 2.0
  • Created about 7 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A React Starter App that displays how web developers can integrate their front end with AWS on the backend. The App interacts with AWS Cognito, API Gateway, Lambda and DynamoDB on the backend.

AWS Mobile React Starter Kit

This sample application has been archived in favor of Amplify JS Samples. While the archived repository will still work, please go +1 this feature request for AWS Mobile React Starter Kit sample if you are looking to use this sample.

Bootstrap a React application on AWS. This sample automatically provisions a Serverless infrastructure with authentication, authorization, website hosting, API access and database operations. It also includes user registration and MFA support. The sample use case is a "Restaurant" ordering system where after a user registers and logs in they can view different restaurant menus, select items and place orders.

This starter uses the AWS Amplify JavaScript library to add cloud support to the application.

Quicklinks

Architecture Overview

You will be building a React application with User Registration & Sign-in that allows you to perform CRUD operations against a DynamoDB table by using an Express application running in AWS Lambda. Lambda will be invoked by API Gateway using Proxy Integration with greedy paths that only authenticated users can access. The Express server is running with the AWS Serverless Express framework.

Alt Text

AWS Services used:

  • Amazon Cognito User Pools
  • Amazon Cognito Federated Identities
  • Amazon API Gateway
  • AWS Lambda
  • Amazon DynamoDB
  • Amazon S3
  • Amazon CloudFront

Prerequisites

Getting Started

  1. Create your backend resources and download the sample code inside of my-project folder.

    $ awsmobile start my-project react
    
  2. Finally run the app:

    $ cd my-project
    $ awsmobile run
    

Done!

Publish the app

To publish your application to Amazon S3 and Amazon CloudFront:

  $ awsmobile publish
  • Alternatively using NPM:
  $ npm install
  $ npm start

Done!

Enabling federated sign-in

Federated sign-in controls for Google, Facebook and Amazon are provided in the user interface by default; however, the client ids for these providers are not valid. Dummy values are provided in the federated object within index.js so that the user interface controls appear. You can remove any of the controls by deleting the appropriate keys from the federated object.

You may also remove federated sign-in entirely by removing the 'federated={federated}' statement from the ReactDOM.render call in index.js.

Enabling federated sign-in is a three step process:

  1. Register your application with the provider(s).

    The identity providers will request information about your application, and will supply you with an application ID and other keys that your application(s) will use for authentication. Keep in mind that some providers may supply separate application IDs for multiple applications even when these applications are sharing AWS resources.

  2. Enable the provider for your application.

    There are multiple ways of enabling a federated identity provider for your application.

    The AWS Mobile CLI provides commands for enabling providers.

    $ awsmobile user-signin enable
    $ awsmobile user-signin configure
    
    If you select Facebook:
    ? Facebook App ID xxxxxxx
    
    If you select Google:
    ? Google Web App Client ID xxxxxxx
    ? Google Android Client ID xxxxxxx
    ? Google iOS Client ID xxxxxxx
    
    
    $awsmobile push
    

  AWS Mobile Hub allows you to register an identity provider by accessing the User Sign-In section and selecting the provider under the Add sign-in Providers section.

  The AWS Cognito and IAM Consoles allow you to register identity providers as well.  Please see the respective documentation for these services.
  1. Once you have registered your application with your federated identity provider(s) and have enabled federated identity for your application, make sure to include your client ids in the federated object in index.js.

Links to additional information about federated identity providers may be found here.

Using the default Greetings Component

This application is using a custom nav with it's own logout button. However, the Authenticator component can provide a default Greetings component which displays the username and a login/logout button. You can enable this by removing the Greetings element from the Authenticator's 'hide' array in index.js.

Application walkthrough

Alt Text

  1. Open a browser to http://localhost:8080 and view the Authenticator component. Choose Sign Up Now and type in a username, password, email address and phone number.

Alternatively, if you have enabled federated sign-in you can select the provider and skip to step 5.

  1. You should recieve a 6-digit verification code via SMS. Type this into the screen and select Validate.

  2. Now that you are registered you will be redirected to the Login page. Type in the username and password then select Login.

  3. You will recieve another SMS verification code. This is the MFA flow upon user login. Enter the code into the screen and select Validate.

  4. The application demonstrates both loading sample data into the database as well as listing data and navigation. As a first time user press Insert Restaurants to load sample restaurants into the application.

  • The sample data is stored inside the imported Lambda function (init.js). This demonstrates how Lambda code can be used with Express to insert records into DynamoDB. The request from the client to API Gateway is signed using AWS Signature Version 4 with the credentials returned from Amazon Cognito when the user logged into the application. Refer to the advanced section of this document for more information on using this in your designs.
  1. Now that data has been loaded select List Restaurants to display the list of restaurants that were added in the previous step. This also uses the signing process described above.

  2. Click on the name of a restaurant to see a menu.

  3. Press Order to place an order in the system. This will add an order entry to a DynamoDB table as well as store information in the local browser for tracking.

  4. Press Orders in the navigation bar. You will see some information immediately from local storage and other information returned asynchronously from a call to API Gateway.

  • The navigation bar is optimized to work across desktop and mobile browsers. It will show either at the top of the page or in a collapsible bar on the left for mobile form factors
  1. Select Logout in the navigation bar to return the user to the home page.

Building and deploying

The following steps outline how you can build and deploy the application using the S3 and CloudFront resources created by the Import phase above:

  1. Navigate to ./aws-mobile-react-sample/client and build for production by running:

    $ awsmobile publish

This will automatically run the npm run-script build command, upload your application to Amazon S3 and Amazon CloudFront, and open your default web browser to the Amazon S3 static web hosting page.

Automating Build & Deploy

If you are using a CI/CD process you may choose to automate this process. The following shows how to use a webpack plugin with AWS Credentials to automate deployment to S3:

  1. Navigate to ./aws-mobile-react-sample/client/ directory and edit webpack.config.js file. Add the following to the top of the file:
const S3Plugin = require('webpack-s3-plugin');
  1. Add the following as an entry to the plugins:[] section towards the bottom:
new S3Plugin({
  // Only upload css and js
  include: /.*\.(css|js)/,
  // s3Options are required
  s3Options: {
    accessKeyId: AWS_ACCESS_KEY_ID,
    secretAccessKey: AWS_SECRET_ACCESS_KEY,
  },
  s3UploadOptions: {
    Bucket: 'MyBucket'
  }
})

NOTE: Replace the AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and MyBucket with appropriate values such as your account keys for automation and the S3 bucket created during the import process.

  1. Save the file and run the following command to install the plugin dependency:
npm install --save webpack-s3-plugin
  1. Run the following command to build and deploy to S3:
$ awsmobile publish

Advanced Usage

Using the Registration and Login components in your application

The Registration and Login components leverage AWS Amplify to make calls to Amazon Cognito User Pools and Amazon Cognito Federated Identities . As an example of using it in your own application first create a React application with Create React App:

npm install -g create-react-app
create-react-app my-app
cd my-app/
npm start

If the application runs successfully, copy the Auth, configuration and css folders from ./aws-mobile-react-sample/client/src to ./my-app/src that was created by Create React App. Next copy index.js and Main.jsx from ./aws-mobile-react-sample/client/src to ./my-app/src. Edit the copied Main.jsx so that the return() function matches the below code:

return (
  <div>
    {
      !logOut && (
        <BrowserRouter>
          <div>
            <Navbar className='nav-bar' brand='WebApp' right>
              <NavItem onClick={this.signOut}>Logout</NavItem>
            </Navbar>
            <App/>
          </div>
        </BrowserRouter>
      )
    }
    {
      logOut && (<AppRoute authStatus={false}/>)
    }
  </div>
);

Next, from your ./my-app directory, run:

$npm install --save aws-amplify react-router-dom react-materialize react-transition-group@^1.1.3 semantic-ui-react css-loader

Edit Main.jsx and comment out the following:

//import Home from './Home';
//import Menu from './API/Menu';
//import Orders from './API/Order';

Also add import App from './App'; to the top of Main.jsx and save the file.

Edit index.js and replace the require('file-loader....') statement towards the top with:

require('file-loader?name=[name].[ext]./index.html');

Finally to add the styling to the page edit ./my-app/public/index.html and add the following to the head:

<link rel="stylesheet" href="http://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.0/css/materialize.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.2/semantic.min.css">

And add the following to the body:

<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.0/js/materialize.min.js"></script>

You can now run your application created with Create React App with a new login page added:

npm start

The application should start and allow you to register users and login taking you to the normal page created with Create React App.

Using AWS Amplify to communicate with API Gateway

The sample application uses API Gateway and Lambda to run an Express application which reads and writes to a DynamoDB table. Included in the sample is a helper function for making signed requests to API Gateway. We'll show how to use this helper for making unauthenticated requests to API Gateway below and you can use the Login example above to get authenticated credentials which this sample would use.

As with the previous section first create a React application with Create React App:

npm install -g create-react-app
create-react-app my-app
cd my-app/
npm start

If you didn't do the previous section, copy configuration from ./aws-mobile-react-sample/client/src to ./my-app/src.

Edit ./my-app/src/App.js with the following imports at the top:

import Link from 'link-react';
import { Table } from 'semantic-ui-react';
import awsmobile from './configuration/aws-exports';
import Amplify,{API} from 'aws-amplify';

Amplify.configure(awsmobile);

** NOTE: To make calls to API Gateway through AWS Amplify, you need your IdentityPoolID in aws-exports.js. For further documentation, refer to AWS Amplify Modify the App component like so (NOTE: you are NOT modifying the render function YET):

class App extends Component {
  state = {
    data: []
  }

  fetch = async () => {
    this.setState(() => {
      return {
        loading: true
      }
    });

    API.get('ReactSample','/items/restaurants')
        .then(resp => {
          this.setState({
            data: resp
          });
          console.log("response is : ", resp);
        })
        .catch (err => console.log(err))
  }
}

//render logic below
render()....more code

Now, change the render() function like so:

render() {
    return (
      <div className="App">
        <Link onClick={this.fetch}>
          List restaurants
        </Link>
        <div>
          <div>
        {(
      <Table>
          <Table.Header>
          <Table.Row>
            <Table.HeaderCell>Name</Table.HeaderCell>
            <Table.HeaderCell>Address</Table.HeaderCell>
            <Table.HeaderCell>Contact</Table.HeaderCell>
            <Table.HeaderCell>Rating</Table.HeaderCell>
          </Table.Row>
        </Table.Header>
        <Table.Body>
          {this.state.data.map((data, idx) =>
            <Table.Row key={idx}>
              <Table.Cell>{data.name}</Table.Cell>
              <Table.Cell>{data.address}</Table.Cell>
              <Table.Cell>{data.phone}</Table.Cell>
              <Table.Cell>{data.rating}</Table.Cell>
            </Table.Row>
          )}
        </Table.Body>
      </Table>
    )}
    </div>
        </div>
      </div>
    );
  }
}

export default App;

Save the file. Finally install the dependencies:

npm install --save link-react semantic-ui-react

Depending on if you want to do Authenticated or UnAuthenticated requests to API Gateway, you will need the following modification:

Authenticated Requests

Note: If you are doing an authenticated, signed request you'll also need to perform a couple more steps. First install querystring-browser

npm install --save querystring-browser@^1.0.4

Next you will need to configure this as a webpack alias:

resolve: {
  extensions: ['.js', '.jsx'],
  alias: {
    querystring: 'querystring-browser'
  }
}

For our Create React App sample you will need to modify either webpack.config.dev.js or webpack.config.prod.js in the ./my-app/node_modules/react-scripts/config directory. Look for the resolve: field inside module.exports and add the querystring: 'querystring-browser' entry under the alias field.

UnAuthenticated Requests

Navigate to the API Gateway console, click on the ReactSample-MobileHub API and select Resources on the left hand side of the page. Under the /items node select ANY and then click on Method Request in the right hand side of the console. Click the dropdown labeled Authorization and select NONE. Press the Update tick box to save your changes.

In the same part of the console, select the /items/{proxy +} node followed and click ANY and then Method Request. Repeat the process of setting Authorization to NONE and saving your change.

Next deploy your changes by select Actions at the top of the page, then Deploy API and select Development as the Deployment stage. Click Deploy.

Additionally you will need to make an alteration to the ./my-app/src/App.js by changing the this.setState() function from:

this.setState({
  data: resp
});

To:

this.setState({
  data: resp.data
});

Run your application

Finally, after making your modifications for either the Authenticated or UnAuthenticated request run the following command to launch your Create React App again:

npm start

Click List restaurants at the top of the page to use the AWS Amplify API component.

Modifying Express routes in Lambda

The sample application invokes a Lambda function running Express which will make CRUD operations to DynamoDB depending on the route which is passed from the client application. You may wish to modify this backend behavior for your own needs. The steps outline how you could add functionality to "create a Restaurant" by showing what modifications would be needed in the Lambda function and the corresponding client modifications to make the request.

  1. Add the following function into app.js before the section that says * Restaurant methods *
var putCallback = function(err, data) {
    if (err) {
        console.log(err)
    }
}

function createMenu(restaurant_id) {
    var item1 = {}
    item1.id = uuid.v1()
    item1.restaurant_id = restaurant_id
    item1.name = "Golden Ratio Bacon Skewers"
    item1.description = "Fibonacci on a stick! Who doesn’t like bacon on a stick that keeps going?"
    item1.photos = []
    dynamoDb.put({
        Item: item1,
        TableName: MENU_TABLE_NAME
    }, putCallback)
    var item2 = {}
    item2.id = uuid.v1()
    item2.restaurant_id = restaurant_id
    item2.name = "Abelian Cucumber Salad"
    item2.description = "A cool and refreshing salad for any hot summer day."
    item2.photos = []
    dynamoDb.put({
        Item: item2,
        TableName: MENU_TABLE_NAME
    }, putCallback)
    var item3 = {}
    item3.id = uuid.v1()
    item3.restaurant_id = restaurant_id
    item3.name = "Chili-Cucumber orientable Corn"
    item3.description = "Feel like you’re connected to nature with corn that wraps around your belly."
    item3.photos = []
    dynamoDb.put({
        Item: item3,
        TableName: MENU_TABLE_NAME
    }, putCallback)
    var item4 = {}
    item4.id = uuid.v1()
    item4.restaurant_id = restaurant_id
    item4.name = "Finite Short-Rib Fields"
    item4.description = "No utensils! BBQ is finger food!"
    item4.photos = []
    dynamoDb.put({
        Item: item4,
        TableName: MENU_TABLE_NAME
    }, putCallback)
    var item5 = {}
    item5.id = uuid.v1()
    item5.restaurant_id = restaurant_id
    item5.name = "Easy Fractal Salad"
    item5.description = "This symmetric pasta salad features feta, artichoke hearts, and kale."
    item5.photos = []
    dynamoDb.put({
        Item: item5,
        TableName: MENU_TABLE_NAME
    }, putCallback)
}
  1. Now in the routes section (under the * Restaurant methods * comment) add in a new POST route:
app.post('/items/restaurants/new', function(req, res){
    var restaurant = {}
    restaurant.id = uuid.v1()
    restaurant.name = req.body.name
    restaurant.description = req.body.description
    restaurant.address = req.body.address
    restaurant.phone = req.body.phone
    restaurant.rating =req.body.rating
    dynamoDb.put({
        Item: restaurant,
        TableName: RESTAURANTS_TABLE_NAME
    }, function(err,data){
        if (err){
            res.json({ message: err })
        }else {
            res.json({
                message: "New Restaurant added!"
            })
        }
    })
    createMenu(restaurant.id)
})
  1. Save the file and in the Mobile Hub console for your project click the Cloud Logic card. Expand the View resource details section and note the name of the Lambda function in the list for the next step.

  2. In a terminal navigate to ./aws-mobile-react-sample/backend/lambda and run:

zip -r lambda-archive.zip .
aws lambda update-function-code --function-name FUNCTION_NAME --zip-file fileb://lambda-archive.zip

REPLACE the FUNCTION_NAME with your Lambda function name from the previous step.

Alternatively you could click the Lambda function resource in the Mobile Hub console which opens the Lambda console and press the Upload button on that page to upload the lambda-archive.zip file.

  1. In the ./aws-mobile-react-sample/client/src directory edit Home.jsx with the following code BEFORE the render() method:
newRestaurant = () => {
  let body = JSON.stringify({
    'name': 'New Name',
    'description': 'New description',
    'address': 'New address',
    'phone': 'New phone',
    'rating': 'New rating'
  });

  let requestParams = {
    method: 'POST',
    url: apiRestarauntUri + '/new',
    headers: {'content-type': 'application/json'},
    body
  }

  this.restResponse = restRequest(requestParams)
    .then(data => {
      sessionStorage.setItem('latestOrder', data.id);
      console.log(data);
      alert('Added successfully');
    })
    .catch (function(error){
      console.log(error);
    });
}

Note that url: apiRestarauntUri + '/new' matches the path you made for the Express route in the Lambda function you uploaded.

  1. In the return statement of the render method add in a new button next to the others:
<Button primary onClick={this.newRestaurant}>
  New Restaurant
</Button>

Save your changes and run your application again with npm start. You should have a new button after logging in. Press New Restaurant and then List Restaurants to see the new entry in the system.

Security Information

Storage locations

The website hosting location for this sample uses an S3 bucket as the CloudFront origin. The S3 bucket is by default configured as publicly accessable for testing purposes. To learn more about restricting this access further, see Amazon S3 Security Considerations and Amazon CloudFront Security Considerations.

sessionStorage

This sample app uses sessionStorage to persist user tokens (accessKeyId, secretAccessKey and sessionToken). They are deleted when the browser is closed and not available when new tabs are opened. You can take further actions to secure these tokens by encrypting them.

API Handler Table Permissions

The Lambda function in this sample will read and write to DynamoDB and it's role will be granted the appropriate permissions to perform such actions. If you wish to modify the sample to perform a more restricted set of actions see Authentication and Access Control for Amazon DynamoDB.

More Repositories

1

amazon-dsstne

Deep Scalable Sparse Tensor Network Engine (DSSTNE) is an Amazon developed library for building Deep Learning (DL) machine learning (ML) models
C++
4,430
star
2

aws-mobile-react-native-starter

AWS Mobile React Native Starter App https://aws.amazon.com/mobile
JavaScript
2,230
star
3

aws-lambda-container-image-converter

The AWS Lambda container image converter tool (img2lambda) repackages container images (such as Docker images) into AWS Lambda function deployment packages and Lambda layers.
Go
1,321
star
4

amazon-cognito-identity-js

Amazon Cognito Identity SDK for JavaScript
JavaScript
985
star
5

serverless-image-resizing

ARCHIVED
JavaScript
815
star
6

aws-serverless-auth-reference-app

Serverless reference app and backend API, showcasing authentication and authorization patterns using Amazon Cognito, Amazon API Gateway, AWS Lambda, and AWS IAM.
TypeScript
753
star
7

aws-service-operator

AWS Service Operator allows you to create AWS resources using kubectl.
Go
733
star
8

serverless-app-examples

JavaScript
716
star
9

aws-cognito-angular-quickstart

An Angular(v5)-based QuickStart single-page app utilizing Amazon Cognito, S3, and DynamoDB (Serverless architecture)
TypeScript
690
star
10

aws-sdk-react-native

AWS SDK for React Native (developer preview)
JavaScript
634
star
11

aws-lambda-zombie-workshop

Code and walkthrough labs to set up a serverless chat application for the Zombie Apocalypse Workshop
JavaScript
619
star
12

aws-security-benchmark

Open source demos, concept and guidance related to the AWS CIS Foundation framework.
Python
612
star
13

aws-appsync-chat

Real-Time Offline Ready Chat App written with GraphQL, AWS AppSync, & AWS Amplify
JavaScript
557
star
14

aws-apigateway-importer

Tools to work with Amazon API Gateway, Swagger, and RAML
Java
518
star
15

realworld-serverless-application

This project is inspired by the design and development of the AWS Serverless Application Repository - a production-grade AWS service. Learn how AWS built a production service using serverless technologies.
Java
515
star
16

aws-waf-sample

This repository contains example scripts and sets of rules for the AWS WAF service. Please be aware that the applicability of these examples to specific workloads may vary.
Python
512
star
17

aws-full-stack-template

AWS Full-Stack Template is a full-stack sample web application that creates a simple CRUD (create, read, update, delete) app, and provides the foundational services, components, and plumbing needed to get a basic web application up and running.
TypeScript
494
star
18

data-pipeline-samples

This repository hosts sample pipelines
Python
460
star
19

aws-sdk-ios-v1

ARCHIVED: Version 1 of the AWS SDK for iOS
Objective-C
450
star
20

dynamodb-janusgraph-storage-backend

The Amazon DynamoDB Storage Backend for JanusGraph
Java
444
star
21

amazon-cognito-auth-js

The Amazon Cognito Auth SDK for JavaScript simplifies adding sign-up, sign-in with user profile functionality to web apps.
JavaScript
423
star
22

cloudwatch-logs-subscription-consumer

A specialized Amazon Kinesis stream reader (based on the Amazon Kinesis Connector Library) that can help you deliver data from Amazon CloudWatch Logs to any other system in near real-time using a CloudWatch Logs Subscription Filter.
Java
398
star
23

web-app-starter-kit-for-fire-tv

Web App Starter Kit Examples
JavaScript
376
star
24

aws-mobile-appsync-events-starter-react

GraphQL starter application with Realtime and Offline functionality using AWS AppSync
JavaScript
369
star
25

aws-amplify-vue

A Vue.js starter app integrated with AWS Amplify
JavaScript
350
star
26

amazon-kinesis-connectors

Java
328
star
27

dynamodb-geo

Java
271
star
28

aws-sdk-core-ruby

This repository has moved to the master branch of aws/aws-sdk-ruby
244
star
29

golang-deployment-pipeline

An example of infrastructure and application CI/CD with AWS CodePipeline, AWS CodeBuild, AWS CloudFormation and AWS CodeDeploy
Go
242
star
30

amazon-transcribe-websocket-static

A static site demonstrating real-time audio transcription via Amazon Transcribe over a WebSocket.
JavaScript
202
star
31

amazon-cognito-js

Amazon Cognito Sync Manager for JavaScript
JavaScript
202
star
32

aws-week-in-review

ARCHIVED: These files are used to produce the AWS Week in Review.
HTML
181
star
33

amazon-kinesis-data-visualization-sample

Amazon Kinesis Data Visualization Sample Application
JavaScript
170
star
34

ecs-mesos-scheduler-driver

Amazon ECS Scheduler Driver
Java
168
star
35

service-discovery-ecs-dns

ARCHIVED: Service Discovery via DNS with ECS.
Go
167
star
36

railsconf2013-tech-demo

Seahorse is a way to describe your API
Ruby
167
star
37

aws-appsync-chat-starter-react

GraphQL starter progressive web application (PWA) with Realtime, Offline and AI/ML functionality using AWS AppSync
CSS
163
star
38

k8s-cloudwatch-adapter

An implementation of Kubernetes Custom Metrics API for Amazon CloudWatch
Go
157
star
39

certlint

X.509 certificate linter
C
156
star
40

amazon-polly-sample

Sample application for Amazon Polly. Allows to convert any blog into an audio podcast.
Python
147
star
41

aws-mobile-appsync-events-starter-react-native

GraphQL starter application with Realtime and Offline functionality using AWS AppSync
JavaScript
146
star
42

ec2-scheduler

The EC2 Scheduler uses a recurring Lambda function to automatically start and stop EC2 instances based on either default schedule or custom schedule defined per EC2 instance. - Now found at https://github.com/awslabs/aws-instance-scheduler
Python
146
star
43

amplify-photo-gallery-workshop

AWS Workshop tutorial for building a photo gallery web app using AWS Amplify and AWS AppSync.
JavaScript
145
star
44

awsmobile-cli

CLI experience for Frontend developers in the JavaScript ecosystem.
JavaScript
142
star
45

aws-serverless-event-fork-pipelines

AWS Event Fork Pipelines helps you build event-driven serverless applications by providing pipelines for common event-handling requirements, such as event backup, analytics, and replay. The pipelines are based on AWS SAM, and can be deployed directly from AWS SAR into your AWS account.
Python
141
star
46

aws-flow-ruby

ARCHIVED
Ruby
138
star
47

aws-appsync-rds-aurora-sample

An AWS AppSync Serverless resolver for the Amazon Aurora relational database.
JavaScript
132
star
48

aws-training-demo

AWS Technical Trainers Demos
Scala
128
star
49

automating-governance-sample

Sample pipeline for handling of security events in AWS.
Python
128
star
50

cognito-sample-nodejs

Amazon Cognito Sample App for Node.js
CSS
124
star
51

aws-amplify-serverless-plugin

Plugin for the Serverless Framework to output AWS Amplify configuration files.
JavaScript
123
star
52

lightsail-auto-snapshots

Lambda function to automatically back up your Lightsail instances.
Python
119
star
53

aws-serverless-appsync-loyalty

Unicorn Loyalty: E-Commerce Serverless GraphQL Loyalty Sample App
JavaScript
115
star
54

aws-robomaker-sample-application-deepracer

Use AWS RoboMaker and demonstrate running a simulation which trains a reinforcement learning (RL) model to drive a car around a track
Python
113
star
55

sql-jdbc

🔍 Open Distro for Elasticsearch JDBC Driver
Java
111
star
56

BSMobileProvision

ARCHIVED: A category for parsing your iOS app's embedded.mobileprovision at runtime. Use it to, among other things, determine at runtime whether your app is being distributed as dev, release, ad hoc, app store, or enterprise.
Objective-C
108
star
57

service-discovery-ecs-consul

This repository provides the assets referred to in the blog post "Service Discovery via Consul with Amazon ECS"
HTML
108
star
58

kinesis-storm-spout

Kinesis spout for Storm
Java
106
star
59

aws-sdk-unity

ARCHIVED: The aws sdk for unity is now distributed as a part of aws sdk for dotnet:
C#
106
star
60

samljs-serverless-sample

Sample Lambda code, CloudFormation, SAM templates and Client website for performing SAML auth flows for AWS access in user applications
JavaScript
105
star
61

logstash-input-dynamodb

This input plugin for Logstash scans a specified DynamoDB table and then reads changes to a DynamoDB table from the associated DynamoDB Stream.This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline. This gem is not a stand-alone program.
Ruby
105
star
62

aws-dynamodb-session-tomcat

ARCHIVED: Amazon DynamoDB based session store for Apache Tomcat
Java
95
star
63

legacy-skill-samples-java

These samples utilize a version of the Alexa Skills Kit SDK that is no longer supported. Please visit https://github.com/alexa/alexa-skills-kit-sdk-for-java
Java
94
star
64

aws-sdk-arduino

An experimental SDK for working with AWS Services on Arduino-compatible devices. Currently has support for DynamoDB and Kinesis.
C++
90
star
65

dynamodb-import-export-tool

Exports DynamoDB items via parallel scan into a blocking queue, then consumes the queue and import DynamoDB items into a replica table using asynchronous writes.
Java
90
star
66

cost-optimization-ec2-right-sizing

The EC2 Right Sizing solution has reached the end of its useful life. Right-sizing functionality is available as a native feature of AWS Compute Optimizer. Details here: https://aws.amazon.com/compute-optimizer/. The solution will be removed the AWS Solutions library and archived on GitHub. Archived solutions will continue to be available on GitHub; however, the AWS Solutions Team has no further plans to update or provide technical support for the solution.
Python
86
star
67

aws-vpc-flow-log-appender

Sample code to append additional information (e.g. Security Group IDs and geolocation data) to VPC Flow Logs for analysis in Elasticsearch.
JavaScript
84
star
68

aws-mobile-ionic-sample

It is a Ionic Sample App that displays how web developers can integrate their front end with AWS on the backend. The App interacts with AWS Cognito, API Gateway, Lambda and DynamoDB on the backend.
TypeScript
82
star
69

aws-appsync-codegen

Code Generator utility for AWS Appsync
TypeScript
81
star
70

aws-appsync-gatsby-sample

Demonstrates how Gatsby can call AWS AppSync GraphQL APIs. This sample project displays events created in an AWS AppSync endpoint within Gatsby.
JavaScript
80
star
71

cloudwatch-logs-centralize-logs

Sample code - A Lambda function that helps in centralizing logs from Elastic Load Balancing (ELB) using Amazon S3 bucket triggers.
JavaScript
80
star
72

lambda-runcommand-configuration-management

Serverless, SSHless, Continuous Configuration Management
Python
78
star
73

aws-serverless-ember

Example web application for building a Serverless EmberJS based web application using AWS JavaScript SDK, Cognito User Pools, API Gateway, DynamoDB, and Lambda/S3.
JavaScript
77
star
74

aws-reinvent-2019-mobile-workshops

AWS re:Invent 2019 Mobile Workshops
CSS
75
star
75

aws-weathergen

This software provides a starter kit for users to be able to take a range of data and have this data published on to arbitrary MQTT topics for consumption by any application able to ingest such a stream. This includes AWS IoT.
JavaScript
75
star
76

skill-sample-nodejs-calendar-reader

An Alexa Skill Sample showing how to import calendar data from an .ICS file.
JavaScript
74
star
77

aws-scala-sdk

It's like the AWS SDK for Java, but more Scala-y
Java
72
star
78

aws-cfn-resource-bridge

ARCHIVED
Python
70
star
79

ecs-cloudwatch-logs

This repository provides the assets referred to in the blog post on using Amazon ECS and Amazon CloudWatch logs.
69
star
80

aws-request-signing-apache-interceptor

Provides AWS Signing implementation of Apache Interface.
Java
67
star
81

emr-sample-apps

Amazon Elastic MapReduce code samples
Java
64
star
82

cloudformation-validation-pipeline

WARNING- This package is no longer supported and will be replaced in the near future. An automated CI/CD Pipeline solution to help accelerate AWS CloudFormation template development
Python
64
star
83

aws-mobile-android-notes-tutorial

The origin code for the AWS Mobile tutorial series for Android Native development.
Java
63
star
84

aws-dynamodb-stream-eventbridge-fanout

This is a serverless application that forwards events from a DynamoDB stream to an Amazon EventBridge event bus.
Java
63
star
85

kinesis-log4j-appender

ARCHIVED: Log4J Appender for writing data into a Kinesis Stream
Java
62
star
86

amediamanager

Java
62
star
87

amazon-quicksight-embedding-sample

A QuickSight dashboard embedding sample for web apps.
HTML
61
star
88

cost-optimization-monitor

Cost Optimization Monitor solution as a reference deployment which provides dashboard and reporting capabilities giving customers a single-pane-of-glass view of their current AWS service inventory.
Python
60
star
89

aws-appsync-relay

A sample Relay app using AWS AppSync
JavaScript
59
star
90

aws-mobile-appsync-events-starter-android

GraphQL starter application using AWS AppSync
Java
57
star
91

startup-kit-nodejs

A Node.js sample workload for use with the AWS Startup Kit.
JavaScript
56
star
92

aws-app-mesh-inject

AWS AppMesh sidecar injector for EKS.
Go
56
star
93

aws-cross-account-manager

An automated reference implementation that assists with setting up corss account roles for easy federation of users from one AWS master account to multiple AWS sub-accounts.
JavaScript
56
star
94

amazon-ecs-interstella-workshop

Amazon ECS Interstella Workshops CON209/318/319/407
HTML
55
star
95

aws-appsync-refarch-microservices

AWS AppSync Microservices Access Layer Reference Architecture
JavaScript
54
star
96

ai-driven-social-media-dashboard

The AI-Driven Social Media Dashboard solutions provides customers with a CloudFormation template that is easy to deploy to use Amazon Translate, Amazon Comprehend, Amazon Kinesis, Amazon Athena, and Amazon QuickSight to build a natural-language-processing (NLP)-powered social media dashboard for tweets.
Python
53
star
97

aws-appsync-refarch-offline

AWS AppSync offline reference architecture powered by the Amplify DataStore
JavaScript
52
star
98

aws-mobile-angular-cognito-sample

A sample for using AWS Cognito qwith Angular projects.
JavaScript
52
star
99

cloudsearchable

An ActiveRecord-style ORM query interface for AWS CloudSearch.
Ruby
51
star
100

dynamodb-tictactoe-example-app

Python
50
star