Closed genifycom closed 5 months ago
@genifycom Good morning. Thanks for opening the issue. Could you please let us know the publishing or deployment steps you used to deploy your Blazor Web app in Lambda (you mentioned Razor web app, but you are also using Blazor)? Also refer API Gateway Rest API - 403 Errors Serving Static Content to see if that helps. Is the stage name included in the generated URLs for JS and CSS files?
Thanks, Ashish
This issue has not received a response in 5 days. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled.
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe the bug
Ref doc https://learn.microsoft.com/en-us/aspnet/core/blazor/components/integration?view=aspnetcore-8.0
I created a Lambda C# Application with the Server Side Rendering (/welcome) which works fine. Then I extended it to use the client side rendering (/counter) which works fine when deployed locally, but when run in AWS lambda, blazor.web.js gets a 403 (so does the {APPNAME}.styles.css).
I have LambdaFullAccecss for the IAM role.
How do we get Client Side Rendering working in a Razor Web App in Lambda?
Expected Behavior
To behave as per running locally.
Current Behavior
https://xxxxx.execute-api.us-east-1.amazonaws.com/_framework/blazor.web.js gives a 403 (forbidden)
Reproduction Steps
bv_la_ssr8.zip Sample project included. Runs in Visual Studio 17.9.3 locally. When deployed to Lambda (using AWS Toolkit 1.49.0.0) /counter route fails to load blazor.web.js
Possible Solution
Unknown
Additional Information/Context
No response
AWS .NET SDK and/or Package version used
Standard .NET Core sample as per Microsoft
Targeted .NET Platform
.NET Core 8
Operating System and version
Windows 11