# Refresh Quicksight Dataset-Lambda

**URL:** <https://community.amazonquick.com/t/refresh-quicksight-dataset-lambda/15597>\
**Category:** Q&A\
**Tags:** data-source, quick-sight\
**Created:** [July 11, 2023, 5:17pm UTC](https://community.amazonquick.com/t/refresh-quicksight-dataset-lambda/15597 "2023-07-11T17:17:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dsahu](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@dsahu](https://community.amazonquick.com/u/dsahu)\
**Post date:** [July 11, 2023, 5:17pm UTC](https://community.amazonquick.com/t/refresh-quicksight-dataset-lambda/15597/1 "2023-07-11T17:17:41Z")

</div>

I have a dataset in Quicksight which has the files from S3(dropped in s3) for the months after May. The dataset has the June files, I dropped a latest file in S3. on \*\*july 11,2023 \*\* . I want to create a lambda which on execution with automatically refresh the quicksight dataset and show the july 11 file, could someone help in providing the steps and lambda function and ways to do this.

---

<div class="post-metadata">

**Author:** ![Srikanth\_Baheti](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/srikanth_baheti/32/3324_2.png) [@Srikanth\_Baheti](https://community.amazonquick.com/u/Srikanth_Baheti)\
**Post date:** [July 11, 2023, 5:21pm UTC](https://community.amazonquick.com/t/refresh-quicksight-dataset-lambda/15597/2 "2023-07-11T17:21:25Z")

</div>

Hi @dsahu,

There are multiple ways to deal with this:  
Quick Sight supports scheduled refreshes of data from your source. This can be configured directly from Quick Sight console from dataset details page. This is the recommended approach as this would not involve any code.

The second option is to use our [CreateIngestion API](https://docs.aws.amazon.com/quicksight/latest/APIReference/API_CreateIngestion.html) and refresh the dataset.

Thanks,  
Sri

---

<div class="post-metadata">

**Author:** ![Sanjeeb2022](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/sanjeeb2022/32/20947_2.png) [@Sanjeeb2022](https://community.amazonquick.com/u/Sanjeeb2022)\
**Post date:** [July 11, 2023, 5:24pm UTC](https://community.amazonquick.com/t/refresh-quicksight-dataset-lambda/15597/3 "2023-07-11T17:24:36Z")

</div>

Hi @dsahu - welcome to AWS Quicksight community and thanks for posting the question. This is an event driven process, when a new file will put in S3, you need configure a lambda function and essentially the lambda function will call boto3 api to refresh the data set ( create ingestion process). See one sample example below - [Invoke AWS Lambda Asynchronously Using Amazon S3 to Trigger Lambda | by Mehmet Ozkaya | AWS Lambda & Serverless — Developer Guide with Hands-on Labs | Medium](https://medium.com/aws-lambda-serverless-developer-guide-with-hands/invoke-aws-lambda-asynchronously-using-amazon-s3-to-trigger-lambda-6c1dee9de7a8)

The quicksight boto3 api details can be found -[QuickSight - Boto3 1.28.2 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/quicksight.html)

Also please refer @Srikanth_Baheti suggestion as well.

Regards - Sanjeeb

---

<div class="post-metadata">

**Author:** ![dsahu](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@dsahu](https://community.amazonquick.com/u/dsahu)\
**Post date:** [July 11, 2023, 6:23pm UTC](https://community.amazonquick.com/t/refresh-quicksight-dataset-lambda/15597/4 "2023-07-11T18:23:46Z")

</div>

Thank you @Srikanth_Baheti and @Sanjeeb2022 for your responses. Really appreciate it!

I understand, we can update the dashboard with latest data coming from the source dataset through the console. But I wanted to check, if there is a way, from your other options that you provided, we can see the latest file information in the source dataset itself. For example: if you look into the below screenshot-

 ![Screen Shot 2023-07-11 at 2.17.54 PM](https://d1wl4jav5dp96l.cloudfront.net/original/2X/c/c07bc1880b9a9f4ec40873aae8ee33bee231874a.png)

the query is written to fetch the files \>2023-06-01, I want to see the File, in this dataset which I dropped today, is there a way to see this, so that automatically the dashboard can view the latest information once we refresh it

---

<div class="post-metadata">

**Author:** ![Srikanth\_Baheti](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/srikanth_baheti/32/3324_2.png) [@Srikanth\_Baheti](https://community.amazonquick.com/u/Srikanth_Baheti)\
**Post date:** [July 11, 2023, 6:52pm UTC](https://community.amazonquick.com/t/refresh-quicksight-dataset-lambda/15597/5 "2023-07-11T18:52:39Z")

</div>

Not sure if I follow you 100%. but if you are looking to get the SPICE ingestion history then we have an API for that. But it is not going to show you the files in the dataset itself. It will show you when the ingestion was run. [ListIngestions API](https://docs.aws.amazon.com/quicksight/latest/APIReference/API_ListIngestions.html)

Not sure the dataset screen you shared is a dataset that you have created separately.
