This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion : "2010-09-09" | |
Transform: AWS::Serverless-2016-10-31 | |
Description: Conference API Service | |
Globals: | |
Api: | |
Cors: | |
AllowMethods: "'*'" | |
AllowHeaders: "'Content-Type'" | |
AllowOrigin: "'*'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
openapi: 3.0.0 | |
info: | |
description: API for the Ordina conference event | |
version: '1' | |
title: Conference-API | |
servers: | |
- url: "https://your-conference-domain.com/api/" | |
description: 'Base URL for the API' | |
paths: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
APP_ID=2kou24pdi9pagm6bawd3jb0jrd | |
APP_SECRET=be9noij0kc98u80asfnomjnm7ppk1pm240vvae | |
URL="my-test-poo.auth.eu-west-1.amazoncognito.com" | |
BASIC=$(echo -n $APP_ID:$APP_SECRET | base64) | |
AUTHENTICATE="Basic $BASIC" | |
echo "https://$URL/oauth2/authorize?response_type=code&client_id=$APP_ID&state=12345&redirect_uri=http://localhost&scope=aws.cognito.signin.user.admin%20email%20openid%20profile&" | pbcopy | |
https://my-test-pool.auth.eu-west-1.amazoncognito.com/oauth2/authorize? | |
response_type=code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE PUMP "YOUR_IN_APPLICATION_STREAM" AS | |
INSERT INTO "YOUR_IN_APPLICATION_PUMP" ("uniqueId", "currentSpeed", ..., "location") | |
SELECT STREAM | |
"sdi"."uniqueId", | |
"sdi"."currentSpeed", | |
..., | |
"ml"."locatie", | |
FROM "SPEED_DIFF_INDICATOR_SQL_STREAM" AS "sdi" LEFT JOIN "measurementLocations" as "ml" | |
ON "sdi"."uniqueId" = "ml"."id"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE PUMP "SPEED_CHANGE_PUMP" AS | |
INSERT INTO "SPEED_CHANGE_SQL_STREAM" | |
SELECT STREAM "s"."uniqueId", | |
LAG("s"."speed", 1, "s"."speed") OVER CURRENT_WINDOW AS "previousSpeed", | |
"s"."speed" AS "currentSpeed" | |
FROM "SPEED_SQL_STREAM" AS "s" | |
WINDOW CURRENT_WINDOW AS (PARTITION BY "s"."uniqueId" ROWS 3 PRECEDING); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE PUMP "STREAM_PUMP_SPEED" AS | |
INSERT INTO "SPEED_SQL_STREAM" | |
SELECT STREAM | |
"uniqueId", | |
AVG("speed") over W0, | |
AVG("speed") over W2, | |
AVG("speed") over W10 | |
FROM "INCOMING_STREAM" | |
WINDOW | |
W0 AS ( PARTITION BY "uniqueId" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def handle(event, context): | |
output = [] | |
for record in event['records']: | |
payload = base64.b64decode(record['data']) | |
result = dropped_or_okay(payload) | |
if result == 'Ok': | |
payload = preprocess_payload(payload) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE STREAM "INCOMING_STREAM" ( | |
"uniqueId" INTEGER, | |
"speed" INTEGER, | |
"bezettingsgraad" INTEGER, | |
"recordTimestamp" TIMESTAMP); | |
CREATE OR REPLACE PUMP "INCOMING_STREAM_PUMP" AS | |
INSERT INTO "INCOMING_STREAM" | |
SELECT STREAM | |
"unieke_id", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"beschrijvende_id": "H101L20", | |
"unieke_id": "3159", | |
"lve_nr": "18", | |
"tijd_waarneming": "2020-04-06T17:51:00+01:00", | |
"tijd_laatst_gewijzigd": "2020-04-06T17:52:20+01:00", | |
"actueel_publicatie": "1", | |
"beschikbaar": "1", | |
"defect": "0", | |
"geldig": "0", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Auth = require("aws-amplify").Auth; | |
import "cypress-localstorage-commands"; | |
const username = Cypress.env("username"); | |
const password = Cypress.env("password"); | |
const userPoolId = Cypress.env("userPoolId"); | |
const clientId = Cypress.env("clientId"); | |
const awsconfig = { |
OlderNewer