-
install AWS cli https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html
-
install AWS SAM CLI (including docker) https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html
-
install nodejs version 14 + npm
# setup aws connection
aws configure
-
Create your teams eventbridge eventbus "myteamname-htf-2021-IdentifiedClues" and "myteamname-htf-2021-reddit" (see also overview)
# install existing depedencies
cd src/adapters/fn-sourceAdapterReddit/
npm install
# Adding new npm dependencies to function
npm install --save snoowrap
# Execute function locally, optional add --skip-pull-image
# Execute from project root folder
sam local invoke FnClueProcessor --event ./events/clueProcessingInput.json -t templates/core/template.yaml
sam local invoke FnSourceAdapterReddit --event ./events/testEvent.json -t templates/adapters/template.yaml
# creating new function
cd src/../
mkdir fn-xxxx
cd fn-xxxx
npm init #All defaults are ok
# see inside script for more info
bash deployAdapters.sh
bash deployChannels.sh
bash deployCore.sh