- SSH in
$ ssh -i [PRIVATE_KEY.PEM] ec2-user@[EC2_DNS_HOSTNAME] - Update OS and packages
$ sudo yum update - Install Docker
$ sudo yum install -y docker - Start Docker
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 express = require('express'); | |
| const app = express(); | |
| const request = require('request'); | |
| app.get('/download-file', function (req, res) { | |
| // sdk way | |
| var s3 = new AWS.S3({}); | |
| var options = { | |
| Bucket: 'my-bucket-name', | |
| Key: file, |
1 shard, 0 replica.
Update default template:
curl -X PUT http://localhost:9200/_template/default -H 'Content-Type: application/json' -d '{"index_patterns": ["*"],"order": -1,"settings": {"number_of_shards": "1","number_of_replicas": "0"}}'
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/sh | |
| set -e | |
| # Install node and npm via nvm - https://github.com/creationix/nvm | |
| # Run this script like - bash script-name.sh | |
| # Define versions | |
| INSTALL_NODE_VER=10 | |
| INSTALL_NVM_VER=0.33.11 | |
| INSTALL_YARN_VER=1.7.0 |