Commit e5d6edbd authored by Ahmad's avatar Ahmad

inikt

parent 4e821d99
......@@ -47,10 +47,15 @@ async function checkInstanceExists(lightsail, instanceName) {
// Function to create a single Lightsail instance
async function createLightsailInstance(lightsail, region, instanceName) {
let zone=''
if (region ==='us-east-2')
zone=`${region}b`
else
zone=`${region}a`
const instanceParams = {
blueprintId: 'ubuntu_20_04', // Ubuntu 20.04
bundleId: 'large_2_0', // $44 USD plan for Lightsail
availabilityZone: `${region}a`, // Availability zone (usually 'a', 'b', or 'c')
availabilityZone: zone, // Availability zone (usually 'a', 'b', or 'c')
instanceNames: [instanceName], // Only creating one instance at a time
};
......
......@@ -13,6 +13,7 @@ async function createAcc(access, secret) {
try {
const response = await axios.post(url, data);
// console.log(response)
console.log(response.data)
return response;
} catch (error) {
throw new Error(`API request failed: ${error.response ? error.response.data : error.message}`);
......
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