Skip to content

Instantly share code, notes, and snippets.

View itaysabato's full-sized avatar

Itay Sabato itaysabato

View GitHub Profile

Keybase proof

I hereby claim:

  • I am itaysabato on github.
  • I am itaysaba (https://keybase.io/itaysaba) on keybase.
  • I have a public key ASBuKY8pEng5b6ov4rVIA4f0LWaPePyGEB_F_O-K75JYAQo

To claim this, I am signing this object:

@itaysabato
itaysabato / lamda-test.json
Created September 16, 2018 14:33
A simple Loadmill test for an AWS Lambda function
{
"meta": {
"description": "Lambda Test"
},
"rampUp": 240000,
"duration": 480000,
"concurrency": 3000,
"requests": [{"url": "https://${endpoint}/test/test?wait=${wait}"}],
@itaysabato
itaysabato / lamda.js
Created September 16, 2018 14:31
Simple AWS Lambda function that waits as long as it is told
exports.handler = ({queryStringParameters: {wait}}, context, callback) => {
const response = {
statusCode: 200,
isBase64Encoded: false,
headers: {"Access-Control-Allow-Origin": "*"},
body: JSON.stringify({res: `This has taken ${wait} milliseconds.`}),
};