Search code examples
amazon-web-servicesfileamazon-s3cloudstatic-assert

Why use AWS S3 to store static assets?


What's the advantage of storing static assets for your application in S3 over having them directly in your repository?

I imagine it's a combination of keeping the size of your repository small and not having it be bloated with images, media files, etc. Is there any other reason? I have a hard time understanding the necessity of storing static assets on S3.


Solution

  • S3 has some properties that make it useful for serving static assets over the internet:

    • Firstly, it's highly available (99.9%).
    • Secondly, it's highly scalable, meaning that it can serve millions of requests at a time.
    • Thirdly, when used with CloudFront it's highly performant from a client perspective, as it can securely serve content at the edge (close to the user) as well as caching content.