const aws = require(‘aws-sdk’); const sns = new aws.SNS(); sns.publish( { Message: message, TopicArn: ‘TOPIC_ARN’ }, function(err, data) { if (err) { console.log(err.stack); return; } console.log(‘push sent’); console.log(data); } ); Leonardo Regis
Tag: aws
javascript
javascript
Create the permission in IAM: … { “Effect”: “Allow”, “Action”: [ “s3:putObject” ], “Resource”: “arn:aws:s3:::my_corporate_bucket/*” } … Tips: You can get the resource ARN just by clicking the bucket and clicking into the button “Copy Bucket ARN” take a look into the link: api on amazon the name of the allowed operations are the fuction ones … Read More “AWS: S3: NOJEJS – PUTOBJECT” »
javascript
link of aws tutorial Create the enviroment variable into lambda into the console or some script. //TODO create a sample here of scripting that Call it into the code using the variable process.env.variablename. It will be like the below code, for a myvar name. let localvariable = process.env.myvar; Leonardo Regis