This file contains hidden or 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
| const Promise = require('bluebird') | |
| const fs = require('fs') | |
| const octokit = require('@octokit/rest')() | |
| octokit.authenticate({ | |
| type: 'basic', | |
| username: 'USER', | |
| password: 'PASS', | |
| }) |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| ssh -i ssh_key.pem [email protected] "echo $(date) >> /tmp/task.log"; | |
| halt; |
This file contains hidden or 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
| const fs = require('fs'); | |
| const aws = require('aws-sdk'); | |
| const ec2 = new aws.EC2({ region: 'eu-west-1' }); | |
| function getUserData() { | |
| return fs.readFileSync(`${__dirname}/user_data.sh`, { encoding: 'utf-8' }); | |
| } | |
| function deployInstance(cb) { | |
| const data = { | |
| ImageId: 'YOUR-AMI-id', // EDIT ME |
This file contains hidden or 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
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Effect": "Allow", | |
| "Action": [ | |
| "logs:CreateLogGroup", | |
| "logs:CreateLogStream", | |
| "logs:PutLogEvents" | |
| ], |
NewerOlder