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
var AWS = require('aws-sdk'); | |
var credentials = new AWS.SharedIniFileCredentials({profile: 'sma-testing-cloudformation'}); | |
AWS.config.credentials = credentials; | |
const endpoint = "shkknwbjca.execute-api.eu-west-1.amazonaws.com/v1" | |
var apigatewaymanagementapi = new AWS.ApiGatewayManagementApi({endpoint:endpoint,apiVersion:"2018-11-29",region:"eu-west-1"}); | |
const dynamoClient = new AWS.DynamoDB({apiVersion: '2012-08-10',region:'eu-west-1'}); | |
let id = "1" // id of connected user. You can retrieve it from your database | |
let message = "Hello from SMA" // message to send to the user | |
// function to get user connection id thanks to userId |
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
### Keybase proof | |
I hereby claim: | |
* I am farouk-lamri on github. | |
* I am farouklamri (https://keybase.io/farouklamri) on keybase. | |
* I have a public key ASA65Nk68Kr0a0imfaXaozwSmTVor0eEPLUrw3T_MhceMAo | |
To claim this, I am signing this object: |