Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
aws
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
aws
Commits
92407902
Commit
92407902
authored
Feb 25, 2025
by
Ahmad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inikt
parent
b46b0985
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
create.js
create.js
+3
-3
No files found.
create.js
View file @
92407902
...
@@ -102,7 +102,7 @@ async function main() {
...
@@ -102,7 +102,7 @@ async function main() {
});
});
// Define the regions and required instances
// Define the regions and required instances
let
regions
=
[
'
us-east-1
'
,
'
us-west-2
'
,
'
us-east-2
'
];
let
regions
=
[
'
us-east-1
'
,
'
us-west-2
'
];
let
requiredInstances
=
[
'
Ubuntu-1
'
,
'
Ubuntu-2
'
];
let
requiredInstances
=
[
'
Ubuntu-1
'
,
'
Ubuntu-2
'
];
// Loop through each region and check/create instances
// Loop through each region and check/create instances
...
@@ -114,8 +114,8 @@ async function main() {
...
@@ -114,8 +114,8 @@ async function main() {
if
(
!
exists
)
{
if
(
!
exists
)
{
console
.
log
(
`Instance
${
instanceName
}
does not exist in region
${
region
}
, creating...`
);
console
.
log
(
`Instance
${
instanceName
}
does not exist in region
${
region
}
, creating...`
);
await
createLightsailInstance
(
lightsail
,
region
,
instanceName
);
await
createLightsailInstance
(
lightsail
,
region
,
instanceName
);
console
.
log
(
`Waiting
3
0 seconds before creating the next instance...`
);
console
.
log
(
`Waiting
6
0 seconds before creating the next instance...`
);
await
sleep
(
3
0000
);
// Wait for 60 seconds to avoid hitting rate limits
await
sleep
(
6
0000
);
// Wait for 60 seconds to avoid hitting rate limits
}
else
{
}
else
{
console
.
log
(
`Instance
${
instanceName
}
already exists in region
${
region
}
, skipping creation.`
);
console
.
log
(
`Instance
${
instanceName
}
already exists in region
${
region
}
, skipping creation.`
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment