What is the difference between Azure blob storage static website and Azure Static Web Apps
4 Answers
There are lot of other benefits that comes with Azure static web apps that don't come with the static website which is hosted on blob storage.
- Functions in the same repo.
- TLS cert management (free!)
- Automated preview environments
- APIs that are scaled and hosted with your static content
- Content and corresponding APIs logically versioned together
- Simplified build and deployment process
UPDATE : Azure static web apps went GA since May 2021
Here is a great blog on the same.
-
1thanks for the info, but I see that Azure static web apps are still in preview is it safe to assume it will be out of preview soon? (I understand you may nt have inside knowledge just thinking there may be a roadmap posted somewhere), also I'm currently using Blob storage static website and Azure CDN for TLS cert management, How would that compare in pricing? Aug 5, 2020 at 17:06
-
-
I have been working on a nextjs based static web app which I am hosting on Azure wep apps. Azure static web app has lot of benefits as everyone mentioned above. I will try to list out some limitations. I hope these limitations will be addressed in future.
- It supports only GitHub. I extensively use Azure Devops so, know I have tomaintain 2 repository hostings.
- No way to configure CORS settings so, I cannot use the backend Azure functions from other client based web apps easily.
- I couldn't figure out a way to access the deployed content on the server.
-
You can set CORS (meanwhile?), see learn.microsoft.com/en-us/azure/static-web-apps/… Dec 16, 2021 at 11:10
-
-
What did you mean by "it supports only GitHub"? I got a static web app hosted in Azure DevOps, deployed from DevOps, see dotnetthoughts.net/… Jan 26, 2022 at 8:30
-
Github was the only option available to host your code when Azure Static web apps were introduced in 2020, when it was in preview stage. Not sure but I think AzureDevops support was added when the service was available generally. Jan 27, 2022 at 17:02
-
1@SangeetAgarwal if you have a nextjs application with server side rendering then you cannot use static web app. Because the html will be generated at the server when user makes a request. So, you need something to execute the code that generates the html. Azure static web apps cannot run such such rendering logic. It only serves static content, i.e files that are pre rendered as html files. You can still have JavaScript or web assemblies on these html pages though. Feb 23, 2022 at 3:36
Azure Static Web Apps is a service that automatically builds and deploys full stack web apps to Azure from a GitHub repository.
Key features
Web hosting for static content like HTML, CSS, JavaScript, and images. Integrated API support provided by Azure Functions.
First-party GitHub integration where repository changes trigger builds and deployments.
Globally distributed static content, putting content closer to your users.
Free SSL certificates, which are automatically renewed.
Custom domains* to provide branded customizations to your app.
Seamless security model with a reverse-proxy when calling APIs, which requires no CORS configuration.
Authentication provider integrations with Azure Active Directory, Facebook, Google, GitHub, and Twitter.
Customizable authorization role definition and assignments.
Back-end routing rules enabling full control over the content and routes you serve.
Generated staging versions powered by pull requests enabling preview versions of your site before publishing. Static Web Apps is free during preview. for more info about static web apps visit: https://learn.microsoft.com/en-gb/azure/static-web-apps/
Azure blob storage for static web site Since its uses blob storage you only pay for storage account. But Azure recommends using an App service with a general purpose V2 standard storage account.
IMO the cost for static web app might be slightly higher that the cost for storage account. Since you get additional benefits like Github, Authorization etc.
Another point is the SLA. With Azure blob storage static website you can reach 99.99% of SLA but with Azure Static Web Apps you can only reach 99.95% of SLA