Skip to content

Instantly share code, notes, and snippets.

View RishiRajSahu's full-sized avatar
🎯
Focusing

Rishiraj Sahu RishiRajSahu

🎯
Focusing
View GitHub Profile
@RishiRajSahu
RishiRajSahu / keybase.md
Created October 21, 2021 16:01
keybase gist

Keybase proof

I hereby claim:

  • I am rishirajsahu on github.
  • I am bruce13 (https://keybase.io/bruce13) on keybase.
  • I have a public key ASALFsTIkWBwYG132-HBYxratuLZpxsd-kfjJOSCcXpHAwo

To claim this, I am signing this object:

@RishiRajSahu
RishiRajSahu / package.json
Created February 4, 2020 05:14
package.json
{
"name": "aws-sns-lambda-integration",
"version": "1.0.0",
"description": "",
"main": "handler.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
@RishiRajSahu
RishiRajSahu / TargetLambda.js
Created February 4, 2020 05:13
TargetLambda.js
/**
* Handler for teams events
*/
module.exports.handler = async event => {
try {
if (event && event.Records && event.Records[0] && event.Records[0].Sns) {
var body = JSON.parse(event.Records[0].Sns.Message)
console.log('Body : ', body)
}
@RishiRajSahu
RishiRajSahu / PublishLambda.js
Created February 4, 2020 05:12
PublishLambda.js
const HttpStatus = require('http-status-codes')
const { getSnsClient, getArnForTopic } = require('../common/helper')
module.exports.handler = async event => {
console.log('Receiver Event : ', event)
try {
const response = await publishSnsTopic(event.body)
console.log('Response : ', response)
return {
@RishiRajSahu
RishiRajSahu / serverless.yml
Last active February 4, 2020 05:10
serverless.yml
# Welcome to Serverless!
#
# This file is the main config file for your service.
# It's very minimal at this point and uses default values.
# You can always add more config options for more control.
# We've included some commented out config examples here.
# Just uncomment any of them to get that config option.
#
# For full config options, check the docs:
# docs.serverless.com