export async function getSpecificInstance()

in src/aws/ec2Instances.ts [27:37]


export async function getSpecificInstance(instanceIds: string[], instanceFilter: InstanceFilter): Promise<Instance> {
    console.log(`Fetching details for: ${instanceIds}`);
    const req = new DescribeInstancesCommand({ InstanceIds: instanceIds });
    try {
        const response = await awsEc2.send(req);
        return instanceFilter(buildInstances(response));
    } catch(err) {
        console.log(err, err.stack, err.statusCode);
        return Promise.reject(err);
    }
}