Skip to content

I8C/htf-alerting-service-empty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

htf-alerting-service

Full Solution Architecture

Environment setup

  1. install AWS cli https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html

  2. install AWS SAM CLI (including docker) https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html

  3. install nodejs version 12 + npm

# setup aws connection
aws configure

ex

Getting started

  1. Adjust deploy scripts setup-1

  2. Create your teams eventbridge tenant eventbridge

  3. Create one of your teams SQS queue sqs All default are ok, when created note down both url and arn

  4. Create your teams nosql database nosql dynamodb setup tip

Local development

# install existing depedencies
cd src/fn-sourceAdapterReddit/
npm install

# Execute function locally, optional add  --skip-pull-image 
sam local invoke FnTrollEventHandler --event ./events/trollEvent.json -t templates/core-troll-alerting-service.yaml

sam local invoke FnSourceAdapterReddit --event ./events/testEvents.json -t templates/event-source-adapters.yaml

sam local invoke FnChannelHandlerMSTeams --event ./events/msTeamsEvent.json -t templates/notification-channel-handlers.yaml --skip-pull-image

# Adding new npm dependencies to function
npm install --save snoowrap

# creating new function
cd src/
mkdir fn-xxxx
cd fn-xxxx
npm init #All defaults are ok

Deploy function to cloud

# see inside script for more info
bash deployAdapters.sh

bash deployChannels.sh

bash deployCore.sh

Documentation

AWS Javascript development

Cloudformation and SAM templates

reddit adapter

Usefull commands

aws configure list
export AWS_PROFILE=yourprofile

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published