Hi and welcome to Stack Overflow!
If I understand your question correctly, you are asking how to get the data from an IoT Analytics Dataset using a Lambda function?
You are correct that get_dataset_content only returns the URI, but it is simple to then fetch the actual content, for example in Python it would look like this;
# Code Fragment to retrieve content from IoT Analytics Dataset
iota = boto3.client('iotanalytics')
response = iota.get_dataset_content(datasetName='my_data_set',versionId='$LATEST')
contentState = response['status']['state']
if (contentState == 'SUCCEEDED') :
url = response['entries'][0]['dataURI']
stream = urllib.request.urlopen(url)
reader = csv.DictReader(codecs.iterdecode(stream, 'utf-8'))
for record in reader:
# Process the record as desired, you can refer to columns in the CSV
# by using record['column_name'] using the DictReader iterator
Note that this code is specifically looking at the most recent results using the $LATEST version - you can also look for the $LATEST_SUCCEEDED version.
There's more documentation here for Boto - the AWS Python SDK, but you can use the same approach in all other sdk supported languages.
Hope that helps,
Roger