A simple JSON API in Node.js which works with Mongo-like databases.
npm install @0bdx/srv-api__A simple JSON API in Node.js which works with Mongo-like databases.__
∅ __Version:__ 0.0.8
∅ __NPM:__
∅ __Repo:__
∅ __AWS Billing Dashboard:__
∅ __App Runner Console:__
To use port 1234 (instead of 8080, the default): $ PORT=1234 npm start
All prices here are before tax.
As far as I can tell, ‘GitHub connections’ do not appear on the AWS invoice, and
are not charged for.
Bandwidth falls under the year-long free tier, and memory-usage does not seem to
be charged-for:
- Bandwidth $0.000 per GB - data transfer out under the monthly global free tier 0.002 GB = USD 0.00
App Runner is fairly cheap. You are charged by the hour, with separate charges
for the ‘build’ service, and the ‘run’ service. The ‘run’ service is divided into
‘provisioned’ (which I think is “up time”), and a charge for CPU time.
On the free tier, while developing this repo, I recreated the app maybe twelve
times, so the ‘build’ charge is much higher than a real app would be:
- USD0.005 per Mins for AppRunner-Build-mins in EU (Frankfurt) 21 Mins = USD 0.11
- AWS App Runner - Provisioned - GB-hours - EU (Frankfurt) __8.122 hours__ = __USD 0.07__
- USD0.074496 per vCPU-hour for AppRunner-vCPU-hours:RunService in EU (Frankfurt) 0.004 vCPU-hour = USD 0.00
Note that ‘Automatic deployments’ could cost $1 per application per month.
I did try using these, but didn’t see a charge appear on my bill yet.
Bandwidth falls under the year-long free tier, and memory-usage does not seem to
be charged-for:
- Bandwidth $0.000 per GB - data transfer out under the monthly global free tier 0.002 GB = USD 0.00
There’s a free log-monitoring service called CloudWatch which could probably be
switched off (the App Runner console provides logs you can manually refresh):
- Amazon CloudWatch 0.00 per alarm metric month - first 10 alarm metrics 0.001 Alarms = USD 0.00
- AmazonCloudWatch EUC1-TimedStorage-ByteHrs First 5GB-mo per month of logs storage is free. 0 GB-Mo = USD 0.00
- AmazonCloudWatch PutLogEvents First 5GB per month of log data ingested is free. 0 GB = USD 0.
Click ‘GitHub connections’ in the sidebar at
If this is the first time you’ve used App Runner, it will probably be empty.
Click ‘Create an App Runner service’ at
Click ‘Source code repository’.
Under ‘Connect to GitHub’, click ‘Add new’.
Wait for a new window to open (disable your popup-blocker browser extension).
- Connection name: srv-api--cnx
- GitHub app: Allow AWS to connect to your GitHub account
After clicking ‘Next’, and clicking ‘GitHub connections’ in the sidebar again,
you should see srv-api--cnx listed.
This app is set to deploy from main, manually (so, pushes to main do not
automatically deploy a new version of the service).
Click ‘Create an App Runner service’ at
- Repository type: Source code repository
- Connect to GitHub: srv-api--cnx • srv-api • main
- Deployment trigger: Manual (or Automatic, which costs $1 per application per month)
- Configuration file: Configure all settings here
- Runtime: Nodejs 16
- Build command: npm install (should only install deps, not †he dev-deps)
- Start command: npm start (or npm start -- -dvw while debugging)
- Port: 8080
- Service name: srv-api-App-Runner-Instance
- Virtual CPU & memory: 1 vCPU • 2 GB
- Health check: Path: / (which __MUST__ respond with a 200 HTTP status)
- Health check: Interval: 20 (once every 20 seconds is the maximum AWS allows)
…and keep the defaults for all the other settings.
Click ‘Next’ and then ‘Create and deploy’.
w