mxmoss / aws Goto Github PK
View Code? Open in Web Editor NEWAWS Scripting
AWS Scripting
# Using aws command line to create an instance of a reverse proxy server # from this tutorial: https://earthly.dev/blog/build-your-own-ngrok-clone/ #Requirements: # AWS CLI - https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" unzip awscliv2.zip sudo ./aws/install # jq - sudo yum install jq #Configuring AWS CLI To copy files: scp -v -i \users\moss\key.pem AWSProxy.sh [email protected]:~ #sed -i.bak 's/\r$//' AWSProxy.sh aws configure chmod +x AWSProxy.sh ./AWSProxy.sh curl -s https://checkip.amazonaws.com > myip.txt set /p MYIP=<myip.txt echo %MYIP% pause erase myip.txt #I had to convert the .pem file to a .ppk file - used PuttyGen for that. #added a passphrase: asdfasdf #aws ec2 describe-instances --instance-ids $EC2_ID NGINX config #edit /etc/nginx/nginx.conf add this line: server_names_hash_bucket_size 128; after this line: default_type application/octet-stream; sudo sed -i '/default_type application\/octet-stream;/a server_names_hash_bucket_size 128;' /etc/nginx/nginx.conf #Start up the reverse proxy service #can this be started and then stopped? or does it need to persist? #i think it is only used to accept the key pair ssh -i key.pem -R 8080:localhost:8080 [email protected] #on your local computer, run a python webserver on port 8080 #Do this in a directory with an index.html #don't put anything you don't want to share with the world python -m http.server 8080 #in your web browser, go to the AWS URL. This will show the index.html on your local PC http://ec2-54-219-44-221.us-west-1.compute.amazonaws.com/ rem Teardown rem Teardown aws ec2 terminate-instances --no-cli-pager --instance-ids %EC2_ID% > null aws ec2 delete-key-pair --no-cli-pager --key-pair-id %KEYPAIRID% aws ec2 delete-security-group --no-cli-pager --group-id %SGGROUPID%
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.