@@ -160367,7 +160367,7 @@ function buildUserDataScript(githubRegistrationToken, label) {
160367160367}
160368160368
160369160369async function getImageId(imageNameMatch) {
160370- const ec2 = new EC2Client();
160370+ const ec2 = new EC2Client({region: process.env.AWS_REGION} );
160371160371
160372160372 const describeImagesParams = {
160373160373 Owners: ['self'],
@@ -160414,7 +160414,7 @@ async function startEc2Instance(label, githubRegistrationToken) {
160414160414 }
160415160415
160416160416 try {
160417- const ec2 = new EC2Client();
160417+ const ec2 = new EC2Client({region: process.env.AWS_REGION} );
160418160418 const runInstancesCommand = new RunInstancesCommand(params);
160419160419 ec2.send(runInstancesCommand, (err, data) => {
160420160420 if (err) {
@@ -160432,7 +160432,7 @@ async function startEc2Instance(label, githubRegistrationToken) {
160432160432}
160433160433
160434160434async function terminateEc2Instance() {
160435- const ec2 = new EC2Client();
160435+ const ec2 = new EC2Client({region: process.env.AWS_REGION} );
160436160436
160437160437 const params = {
160438160438 InstanceIds: JSON.parse(config.input.ec2InstanceId),
@@ -160453,7 +160453,7 @@ async function terminateEc2Instance() {
160453160453async function waitForInstanceRunning(ec2InstanceId) {
160454160454 core.info(`waitForInstanceRunning: ${ec2InstanceId}`)
160455160455 core.info(`region: ${process.env.AWS_REGION}`)
160456- const ec2 = new EC2Client();
160456+ const ec2 = new EC2Client({region: process.env.AWS_REGION} );
160457160457
160458160458 try {
160459160459 await waitUntilInstanceRunning({
0 commit comments