Skip to content

Instantly share code, notes, and snippets.

View rdlabo's full-sized avatar

Masahiko Sakakibara rdlabo

View GitHub Profile
@tony-gutierrez
tony-gutierrez / aws_eb_cron.js
Last active October 11, 2023 02:59
AWS Elastic Beanstalk master instance nodejs cron.
const logger = require('./logger'),
AWS = require('aws-sdk'),
CronJob = require('cron').CronJob;
AWS.config.update({region: 'us-east-1'}); // change to your region
var opts = {
credentials: new AWS.EC2MetadataCredentials()// default to use the credentials for the ec2 instance
};
var elasticbeanstalk = new AWS.ElasticBeanstalk(opts);