Skip to content

java-plus-plus/aws-sdk-js-notes-app

 
 

Repository files navigation

aws-sdk-js-notes-app

In this app, you are going to build a simple note taking application using modular AWS SDK for JavaScript

The note taking application is the modified version from the original Open Source MIT licensed project shared in the tutorials on serverless-stack.

Table of Contents

Prerequisites

To set up this notes app, complete the following tasks:

  • Install Node.js by following these steps:
    1. Install nvm.
    2. Use node v12.x.x by running nvm use or nvm use 12 in a terminal window.
    3. Verify that node is installed by running node -v in a terminal window and confirm that it shows the latest version of v10, such as v12.17.0).
  • Install yarn.
    • We recommend using yarn for its simplicity, speed and yarn workspaces.
  • Install dependencies by running yarn.
  • If you don't have an AWS account, create one.
    • If you're an Amazon employee, see the internal wiki for creating an AWS account.
  • Install the AWS CLI.
    • Verify that the AWS CLI is installed by running aws in a terminal window.
  • Set up AWS Shared Credential File.
    • Your ~/.aws/credentials (%UserProfile%\.aws\credentials on Windows) should look like the following:
      [default]
      aws_access_key_id = <ACCESS_KEY>
      aws_secret_access_key = <SECRET_ACCESS_KEY>
      
    • Your ~/.aws/config (%UserProfile%\.aws\config on Windows) should look like the following:
      [default]
      region = us-west-2
      

Setup

This exercise code uses modular AWS SDK for JavaScript as follows:

  • backend performs create, delete, get, list and update operations on DynamoDB.
  • frontend does put, get, delete operations using an S3 browser client.

Create backend API

  • Run: yarn build:backend
  • This generates bundles to be deployed to lambda.

Deploy infrastructure

  • Run: yarn cdk deploy
  • This command:
    • Creates AWS infrastructure using AWS Cloud Development Kit.
    • Deploys backend bundles to lambda.
    • Creates resources to be used in the frontend.

Prepare frontend API

  • Run: yarn prepare:frontend
  • This command copies AWS resources to the frontend config.

Debug frontend

  • Run: yarn start:frontend
  • This command starts ReactApp for testing frontend, and opens the URL in browser.

Clean up

The Cloudformation stack can be deleted by running: yarn cdk destroy

Contributing

Contributions are more than welcome. Please read the code of conduct and the contributing guidelines.

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

About

A simple note taking application using modular AWS SDK for JavaScript (v3)

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 90.9%
  • JavaScript 6.5%
  • HTML 2.6%