Skip to content

Instantly share code, notes, and snippets.

View hassy's full-sized avatar
🐢
Working through a massive backlog of issues, PRs and emails. Send coffee.

Hassy Veldstra hassy

🐢
Working through a massive backlog of issues, PRs and emails. Send coffee.
View GitHub Profile
@hassy
hassy / parse_aws.md
Last active January 17, 2024 04:11
Deploying Parse Server on AWS (WIP)

Deploying Parse Server on AWS

Note: this is a work-in-progress and will be updated with more information over the next few days.

Intro

This guide will walk you through deploying your own instance of the open-source Parse Server. This would be a good starting point for testing your existing application to see if the functionality provided by the server is enough for your application, and to potentially plan your migration off the Parse Platform.

This guide will walk you through using Elastic Beanstalk (EB), which is an AWS service similar to Heroku. Why use EB rather than Heroku? Elastic Beanstalk does not lock you into Heroku-specific ways of doing things, is likely cheaper to run your backend on than Heroku, and it integrates with other services that AWS offer (and they offer almost everything one needs to run an application these days).

{
"config": {
"target": "http://127.0.0.1:3003",
"phases": [
{"duration": 30, "arrivalRate": 5}
]
},
"scenarios": [
{
"flow": [
node server.js
# npm install artillery
./node_modules/.bin/artillery run large_payload.json
@hassy
hassy / loop.json
Last active November 5, 2019 19:01
Artillery `loop` example
{
"config": {
"target": "http://localhost",
"phases": [
{"duration": 10, "arrivalRate": 20}
]
},
"scenarios": [
{
"flow": [
@hassy
hassy / my-test.yml
Created March 31, 2016 20:17
Example of using processors in Artillery
config:
target: "http://localhost:8080"
phases:
- duration: 60
arrivalRate: 1
processor: "./processor.js"
scenarios:
- name: "Load the options page"
flow:
- get:
@hassy
hassy / lambda.js
Last active September 19, 2022 17:20
Different behavior of context.succeed() vs callback() in AWS Lambda
//
// Lambda's timeout needs to be >5 seconds, 10 should do
//
var startedAt = new Date();
var interval = setInterval(function () {
console.log(startedAt, new Date());
}, 1000);
- post:
url: "/some/url"
formData:
firstName: "Jerry"
lastName: "Winston"
headers:
authorization: "Bearer {{access_token}}"
@hassy
hassy / test.yml
Created July 20, 2016 20:11
Artillery - short duration
config:
target: "http://localhost:3003"
phases:
- duration: 1
arrivalRate: 1
scenarios:
- flow:
- get:
url: "/"
- get:
@hassy
hassy / soda-social-2.md
Last active February 1, 2018 11:15
soda social 2

AWS API Gateway

aws api gateway

GraphQL

graphql

Lambda

@hassy
hassy / soda-social-3.md
Last active February 1, 2018 11:15
soda social 3

What we wanted

To recap:

  • 20 lambdas
  • 10 SNS topics (more than one subscriber/publisher for some)
  • S3 buckets (triggering lambdas)