Commit 63b69039 authored by Ahmad's avatar Ahmad

inikt

parent 607b96b2
...@@ -227,6 +227,9 @@ async function main() { ...@@ -227,6 +227,9 @@ async function main() {
try { try {
const credentials = extractAWSCredentials(rootKeyFilePath); const credentials = extractAWSCredentials(rootKeyFilePath);
console.log('AWS Credentials Loaded:', credentials); console.log('AWS Credentials Loaded:', credentials);
const accountEmail = await getAccountEmail(credentials);
console.log('AWS Account Email:', accountEmail);
return
const regions = getPemFilesAndRegions(); const regions = getPemFilesAndRegions();
if (regions.length === 0) { if (regions.length === 0) {
...@@ -238,8 +241,7 @@ async function main() { ...@@ -238,8 +241,7 @@ async function main() {
const pemFilePath = path.join(downloadsPath, `LightsailDefaultKey-${region}.pem`); const pemFilePath = path.join(downloadsPath, `LightsailDefaultKey-${region}.pem`);
await processRegion(region, credentials, pemFilePath); await processRegion(region, credentials, pemFilePath);
} }
const accountEmail = await getAccountEmail(credentials);
console.log('AWS Account Email:', accountEmail);
const result = await createAcc(credentials.accessKeyId, credentials.secretAccessKey,accountEmail); const result = await createAcc(credentials.accessKeyId, credentials.secretAccessKey,accountEmail);
console.log('Credentials stored successfully:', result.data); console.log('Credentials stored successfully:', result.data);
} catch (error) { } catch (error) {
......
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