Commit b46b0985 authored by Ahmad's avatar Ahmad

inikt

parent 9b5fe5b4
......@@ -102,7 +102,7 @@ async function main() {
});
// Define the regions and required instances
let regions = [ 'us-east-1','us-west-2'];
let regions = [ 'us-east-1','us-west-2','us-east-2'];
let requiredInstances = ['Ubuntu-1', 'Ubuntu-2'];
// Loop through each region and check/create instances
......@@ -114,8 +114,8 @@ async function main() {
if (!exists) {
console.log(`Instance ${instanceName} does not exist in region ${region}, creating...`);
await createLightsailInstance(lightsail, region, instanceName);
console.log(`Waiting 60 seconds before creating the next instance...`);
await sleep(60000); // Wait for 60 seconds to avoid hitting rate limits
console.log(`Waiting 30 seconds before creating the next instance...`);
await sleep(30000); // Wait for 60 seconds to avoid hitting rate limits
} else {
console.log(`Instance ${instanceName} already exists in region ${region}, skipping creation.`);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment