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
| // Demonstration video can be found at: https://youtu.be/_gJyK1-NGq8 | |
| // ModifyEC2InstanceType | |
| const AWS = require('aws-sdk'); | |
| exports.handler = (event, context, callback) => { | |
| const { instanceId, instanceRegion, instanceType } = event; | |
| const ec2 = new AWS.EC2({ region: instanceRegion }); |
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
| // Demonstration video can be found at: https://youtu.be/roAerKVfq-Y | |
| // StopEC2Instance | |
| const AWS = require('aws-sdk'); | |
| exports.handler = (event, context, callback) => { | |
| const ec2 = new AWS.EC2({ region: event.instanceRegion }); | |
| ec2.stopInstances({ InstanceIds: [event.instanceId] }).promise() |
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
| :foreach i in=[/ip dns cache find] do={ | |
| :local bNew "true"; | |
| :local cacheName [/ip dns cache all get $i name] ; | |
| # :put $cacheName; | |
| :if (([:find $cacheName "facebook" -1] >= 0) || ([:find $cacheName "outlook" -1] >= 0)) do={ | |
| :local tmpAddress [/ip dns cache get $i address] ; | |
| :put $cacheName; | |
| :put $tmpAddress; |
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
| upstream project { | |
| server 22.22.22.2:3000; | |
| server 22.22.22.3:3000; | |
| server 22.22.22.5:3000; | |
| } | |
| server { | |
| listen 80; | |
| location / { |