-
Notifications
You must be signed in to change notification settings - Fork 14
1016780: Need to include new UG section on how to deploy spreadsheet server to AWS Lambda #2456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| --- | ||
| layout: post | ||
| title: Deploy Spreadsheet Server to AWS Lambda | ||
| description: Learn how to deploy the Syncfusion Spreadsheet Server to AWS Lamda | ||
| control: How to deploy eploy the Syncfusion Spreadsheet Server to AWS Lamda | ||
| platform: document-processing | ||
| documentation: ug | ||
| --- | ||
|
|
||
| # Publish Spreadsheet Server to AWS Lambda Visual Studio | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| * [`AWS account`](https://aws.amazon.com/lambda/) with `IAM credentials` | ||
| * The Spreadsheet [`Web API`](https://github.com/SyncfusionExamples/EJ2-Spreadsheet-WebServices/tree/main/WebAPI) project (Check out our detailed [`blog`](https://www.syncfusion.com/blogs/post/host-spreadsheet-open-and-save-services) to set up the web service locally). | ||
|
|
||
| ## Publish to AWS Lambda Service | ||
| **Step 1:** Server-Side changes | ||
|
|
||
| * Opening the file: | ||
| The client converts the Excel file to base64 and sends it to the hosted Open endpoint - then simply loads the response into the Syncfusion React Spreadsheet. The AWS Lambda backend decodes the file, processes it with Workbook.Open, and returns spreadsheet-ready JSON for instant rendering on the frontend. You can refer to this [documentation](https://help.syncfusion.com/document-processing/excel/spreadsheet/react/open-excel-files#open-excel-files-with-aws-lambda) to know about the opening the file with AWS Lambda service. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Before mentioning the configuration details, we need to update the details that why we need to add these configurations. |
||
|
|
||
| * Saving the file: | ||
| The client converts the spreadsheet to JSON using the [saveAsJson](https://helpej2.syncfusion.com/react/documentation/api/spreadsheet/#saveasjson) method and sends it to AWS Lambda via fetch. It then decodes the base64 Excel response and creates a downloadable Excel file using a Blob. Receive the spreadsheet JSON in your Lambda function, convert it to an Excel file using Workbook.Save, and return it as a base64 string for secure client-side download. You can refer to this [documentation](https://help.syncfusion.com/document-processing/excel/spreadsheet/react/save-excel-files#save-excel-files-with-aws-lambda) to know about the saving the file with AWS Lambda service. | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Open and Save configuration should not be updated under Publish steps. |
||
|
|
||
| **Step 2:** Deploy ASP.NET Core Spreadsheet Web API Service to AWS Lambda | ||
|
|
||
| * Open `WebAPI project → Extensions > Manage Extensions → install AWS Toolkit with Amazon Q`. Restart VS. | ||
| * From Extensions menu, select `Getting Started → enable AWS Toolkit with IAM credentials`. | ||
| * Install the NuGet package: `Amazon.Lambda.AspNetCoreServer.Hosting`. | ||
| * In WebAPI.csproj, add: | ||
| ```csharp | ||
| <AWSProjectType>Lambda</AWSProjectType> | ||
| ``` | ||
| * In program.cs, add: | ||
| ```csharp | ||
| builder.Services.AddAWSLambdaHosting(LambdaEventSource.RestApi); | ||
| ``` | ||
| * In `Solution Explorer → right-click project → Publish to AWS Lambda`. | ||
| * Then enter your AWS credentials, choose your existing Lambda function or create a new function, enter the Handler name that matches your project name, and upload. | ||
| * Host your project by creating a REST API in AWS API Gateway. | ||
| * Integrate your API with Lambda by editing the integration, selecting your region and function, enabling Lambda Proxy Integration, and saving. | ||
| * Deploy your API by selecting the Deploy API option and creating a new stage name. The hosted URL can then be used for open and save fetch requests in your React Spreadsheet sample. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These are not shoulde be updated like this. If there are any codes to update means, we can update the screenshot for better understanding. Please revamp the publishing steps clearly. |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check the control and update properly. Also, update the description properly.