diff --git a/src/lib.ts b/src/lib.ts index e78413bb..196a9020 100644 --- a/src/lib.ts +++ b/src/lib.ts @@ -64,10 +64,12 @@ const getEc2SpotPrice = async (options: { }); const fetch = async (nextToken?: string): Promise => { + const startTime = new Date(); + startTime.setHours(startTime.getHours() - 3); const result = await ec2 .describeSpotPriceHistory({ NextToken: nextToken, - StartTime: new Date(), + StartTime: startTime, ProductDescriptions: productDescriptions, InstanceTypes: instanceTypes, })