nlesc-serverless-boilerplate
An AWS amplify boilerplate web application
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 3 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.3%) to scientific vocabulary
Repository
An AWS amplify boilerplate web application
Basic Info
- Host: GitHub
- Owner: NLeSC
- License: apache-2.0
- Language: TypeScript
- Default Branch: master
- Size: 797 KB
Statistics
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 5
- Releases: 1
Metadata Files
README.md
NLeSC serverless boilerplate
What is it?
The web application was bootstrapped with Create React App. The web application uses AWS AppSync and Amplify to setup and run infrastructure.
It uses AWS Batch to submit a Docker image as a job.
Frontend
To have a interactive frontend the backend should first be setup.
yarn start
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
yarn test
This will run tests of frontend code.
yarn build
Builds the app for production to the build folder.
Backend
Architecture
- Uses Graphql to communicate between web browser and server
- Uses AWS DynamoDB for persisting data
- Uses AWS S3 for storing input/output data files
- Uses AWS Cognito for authentication
- Uses AWS S3 for deployment
- Uses AWS S3 for hosting
- Uses AWS Batch job, written in Python, to run a computation in a Docker container.
- Uses AWS ECR to store Docker image for AWS Batch
- Uses AWS lambda to submit a AWS Batch job
- Uses AWS lambda to cancel a AWS Batch job
- Uses AWS lambda to listen for a AWS Batch job state changes
- Allows AWS Batch job to read/write to S3 and DynamoDB
- Allows AWS lambda functions to read/write to S3 and DynamoDB
Installation
Requirements: * nodejs, tested with v12.13.1 * yarn, NodeJS package manager * Docker, used for building batch job Docker image * aws cli (pip install awscli) * AWS account
Install amplify cli with
sh
npm install -g @aws-amplify/cli@4.12.0
Amplify cli needs to be installed globally, to not pollute your env we suggest to use nvm to isolate the node env.
Initialize amplify with
```sh amplify configure Follow these steps to set up access to your AWS account:
Sign in to your AWS administrator account: https://console.aws.amazon.com/ Press Enter to continue
Specify the AWS Region ? region: eu-central-1 Specify the username of the new IAM user: ? user name: amplify-******** Complete the user creation using the AWS console https://console.aws.amazon.com/iam/home?region=undefined#/users$new?step=final&accessKey&userNames=amplify-**********&permissionType=policies&policies=arn:aws:iam::aws:policy%2FAdministratorAccess Press Enter to continue
Enter the access key of the newly created user: ? accessKeyId: ********** ? secretAccessKey: ********** This would update/create the AWS Profile in your local machine ? Profile Name: boiler
Successfully set up the new user. ```
To start when there are local amplify resources, but none in cloud with the amplify environment suffix.
```sh amplify env add
Asks for new environment name
```
To use current deployed amplify environment in the cloud
sh
amplify env pull
To start when there are no local or cloud amplify resources (not the case for this boilerplate repo).
sh
amplify init
The amplify resources that we made are logged in docs/log.md
To deploy services
Before amplify push you need to
1. correct in subnet and security group in amplify/backend/batch/task/parameters.json.
```sh
Deploy backend
amplify push
Deploy frontend
amplify publish ```
The url where the application is running will be printed to screen.
After amplify you need to
1. Build & push the Docker image (see amplify/backend/batch/task/ directory) which has the computation in it
2. Create users in AWS Cognito console.
Owner
- Name: Netherlands eScience Center
- Login: NLeSC
- Kind: organization
- Location: Amsterdam, The Netherlands
- Website: https://esciencecenter.nl
- Repositories: 206
- Profile: https://github.com/NLeSC
Citation (CITATION.cff)
# YAML 1.2
---
abstract: |
"An AWS amplify boilerplate web application
"
authors:
-
affiliation: "Netherlands eScience Center"
family-names: Verhoeven
given-names: Stefan
orcid: "https://orcid.org/0000-0002-5821-2060"
-
affiliation: "Netherlands eScience Center"
family-names: Diblen
given-names: Faruk
orcid: "https://orcid.org/0000-0002-0989-929X"
cff-version: "1.1.0"
date-released: 2000-01-27
doi: "10.5281/zenodo.3628236"
identifiers:
keywords:
- cloud
- amplify
- "aws batch"
- react
license: "Apache-2.0"
message: "If you use this software, please cite it using these metadata."
repository-code: "https://github.com/NLeSC/nlesc-serverless-boilerplate"
title: "nlesc-serverless-boilerplate"
version: "0.1.0"
...
GitHub Events
Total
Last Year
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Stefan Verhoeven | s****n@e****l | 49 |
| Faruk D | f****n@e****l | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 9 months ago
All Time
- Total issues: 5
- Total pull requests: 13
- Average time to close issues: N/A
- Average time to close pull requests: 4 months
- Total issue authors: 1
- Total pull request authors: 1
- Average comments per issue: 0.6
- Average comments per pull request: 1.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 13
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- sverhoeven (5)
Pull Request Authors
- dependabot[bot] (13)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- @testing-library/jest-dom ^4.2.4
- @testing-library/react ^9.3.2
- @testing-library/user-event ^7.1.2
- @types/jest ^24.0.0
- @types/node ^12.0.0
- @types/react ^16.9.0
- @types/react-dom ^16.9.0
- aws-amplify ^2.2.0
- aws-amplify-react ^3.1.1
- react ^16.12.0
- react-dom ^16.12.0
- react-scripts 3.3.0
- typescript ~3.7.2
- 1464 dependencies
- boto3 *
