Scheduled (Cron Job) Lambda function not able to make 3rd party API calls

I’ve got 3 functions.

  1. Cron job lambda function
  2. Event driven function which detects when a new record is added to the DynamoDB
  3. A reusable function which is currently called by the 2 above functions

The Cron job function

export async function scheduledFunction() {
	const detailsHistory = await sharedFunction(param1);
}

The event driven function

export async function eventFunction(event) {
	event.Records.forEach(async record => {
		if (record.eventName === 'INSERT') {
			await sharedFunction(param1)
		}
	}
}

The function called by both of the event and scheduled function

const sharedFunction = async (param1) {
	const apiUrl = 'xxxxxx';
	const details = await axios.get(apiUrl, {
		headers: {
			'x-api-key': xxxx
		}
	});	
}

The event function works when the DynamoDB has a new insert and then calls the 3rd party API which works as expected

The scheduled function fires every 4 hours and is works and gets to the sharedFunction, but when its gets to the API call await axios.get it just does nothing, I’m not getting any errors in the CloudWatch. I’ve placed console.logs() before and after the call and it logs the one before but nothing after.