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 startStrapi = require("strapi/lib/Strapi"); | |
const serverless = require("serverless-http"); | |
module.exports.handler = async (event, context) => { | |
if (!global.strapi) { | |
console.log("Cold starting Strapi"); | |
await startStrapi({ dir: __dirname }).start(); | |
} | |
const handler = serverless(global.strapi.app); | |
return handler(event, context); |
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
service: sls-strapi | |
frameworkVersion: '2' | |
provider: | |
name: aws | |
runtime: nodejs12.x | |
lambdaHashingVersion: '20201221' | |
region: eu-west-1 | |
plugins: |
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
VPC | CIDR | name | |
---|---|---|---|
vpc-████████ (10.0.0.0/16) | 10.0.0.0/20 | lambda-subnet-point-to-nat-1 | |
vpc-████████ (10.0.0.0/16) | 10.0.16.0/20 | lambda-subnet-point-to-nat-2 | |
vpc-████████ (10.0.0.0/16) | 10.0.32.0/20 | lambda-subnet-point-to-nat-3 | |
vpc-████████ (10.0.0.0/16) | 10.0.48.0/20 | lambda-subnet-point-to-igw |
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
var http = require("https"); | |
exports.handler = (event, ctx, callback) => { | |
var options = { | |
"method": "GET", | |
"hostname": "ipinfo.io", | |
"port": null, | |
"path": "/json", | |
"headers": { | |
"accept": "application/json", |
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
#!/bin/bash | |
is_root() { | |
[[ $(id -u) -eq 0 ]] | |
} | |
is_ubuntu() { | |
grep "Ubuntu" "/etc/os-release" &>/dev/null | |
} |
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
#!/bin/bash | |
sudo apt-get update | |
sudo apt-get install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
software-properties-common \ | |
-y |
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
contract Token { | |
/// @return total amount of tokens | |
function totalSupply() constant returns (uint256 supply) {} | |
/// @param _owner The address from which the balance will be retrieved | |
/// @return The balance | |
function balanceOf(address _owner) constant returns (uint256 balance) {} | |
/// @notice send `_value` token to `_to` from `msg.sender` |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCiUSMk8Av/mOFAHPN7izZJ1ZPHalKjJlbj5RT4syKX1lqNTzbY44bF15L7ytx2t4/gU7VqP14FG4eqMMwDOxUbvmaArL7c+K4N1xkbLk3GOPMfYTMoqc4jtb8b9xAo+jjd7r3H2XqCkA6JcdCskIzFTJP4s4ZHUV69WB/oTi3zPqswI5l3XzDxEWbHFB/mdgiR5PFIokjRoEg3QmJJErfygdhVaQ0Wo0n9NPHH1sz62DtKH8fpBlbePazcQR9nGF3rNOxAXma+lzsqReDbycxORl776+L9jb7ghWf89NBAV0Lbnmg+Epkuc23+LfxChOSvjSZlL7iUVOm1rZkDTMI8F2kO4Ou2sgzffTX2UrLXyDQ1VZUEI6cIdKdWKEo6JPjHd7ZdjyQjyZlgF8ObWnDGf8V6aMab2GvJ8cjGburV9NBQzCMmpElSzweCmTUdi6CkqG5+uspwkTmrVB3hvrCwkG9V0uxussblYL7WjFwJBRe6H513Chg4LKer1ppRn9wEZS3vQv2nLmXxHosz99IidxBmm9uhNKEUllwKNKBIdpewBXcDKz9HgEmMVJyt8ksQAdey1nLS6J3cabAqFnC5IFbFXRxTBoKkri5hezTYpgtUxinnLbzmVKmIPcN/vtj3xt3Ub2V6C0lG/blVRlNLIvq32weYYMi+SIKv9FpuNQ== nusrath@Nusraths-MacBook-Air.local |
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
#!/bin/bash | |
# Get Docker CE for Ubuntu | |
sudo apt-get remove docker docker-engine docker.io | |
sudo apt-get update | |
sudo apt-get install -y \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
software-properties-common |
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
<VirtualHost *:80> | |
ServerName application.example.com | |
ServerSignature Off | |
ProxyPreserveHost On | |
<Location /> | |
Order deny,allow | |
Allow from all |