jjc1138 / ec2start Goto Github PK
View Code? Open in Web Editor NEWA tool for starting up an EC2 instance (optionally using spot pricing) and setting it up securely for remote connections
A tool for starting up an EC2 instance (optionally using spot pricing) and setting it up securely for remote connections
Copy the logic from JJC1138/route53dynamicdns for upserting or deleting records depending on whether the instance has an IPv6 address assigned.
ec2start
if, for example, your client IP has changed so that you need to be reauthorized to connect in the security groupMainly just to add the help text
botocore.exceptions.ClientError: An error occurred (InvalidParameterValue) when calling the DescribeSecurityGroups operation: Invalid value 'Utility' for groupName. You may not reference Amazon VPC security groups by name. Please use the corresponding id for this operation.
Grab the console log and look for the section like:
<14>Sep 18 18:13:01 ec2: #############################################################
<14>Sep 18 18:13:01 ec2: -----BEGIN SSH HOST KEY FINGERPRINTS-----
<14>Sep 18 18:13:01 ec2: 1024 SHA256:cmrwEeQz9q5EK7k9xXaN3Rc6OLLf05iYbd0hgCfIAN4 root@ip-172-31-16-118 (DSA)
<14>Sep 18 18:13:01 ec2: 256 SHA256:0b/g3YU9XAjw6ynBxfZtm+1B4l+JReUjls3/b46BkV8 root@ip-172-31-16-118 (ECDSA)
<14>Sep 18 18:13:01 ec2: 256 SHA256:2UgB9LxtU/HelSjHt3nUzDZQ3tSDauQRNrP28IDKtKw root@ip-172-31-16-118 (ED25519)
<14>Sep 18 18:13:01 ec2: 2048 SHA256:pK0qTBTwpQCd0V/asdmkhZogI6TLgkubYKXo9LVovbU root@ip-172-31-16-118 (RSA)
<14>Sep 18 18:13:01 ec2: -----END SSH HOST KEY FINGERPRINTS-----
<14>Sep 18 18:13:01 ec2: #############################################################
Parse the lines and add them with the hostname to our known_hosts.
Handle the console log being absent, which may happen when it's not the instance's first boot and it may be blank for a while after first starting too.
Do this stuff only if we don't have an entry for the server in our known_hosts, and if we don't then keep trying to get the console log until it works.
It should create the new image, optionally delete the old one and the corresponding snapshot, and optionally terminate the old instance.
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.