Ends in
00
days
00
hrs
00
mins
00
secs
SHOP NOW

💝 Valentine's Sale! Get 30% OFF Any Reviewer. Use coupon code: PASSION-4-CLOUD & 10% OFF Store Credits/Gift Cards

Find answers, ask questions, and connect with our
community around the world.

Home Forums AWS AWS Certified Solutions Architect Professional s3 should be hosting for static content not dynamic content

  • s3 should be hosting for static content not dynamic content

  • Alak

    Member
    February 4, 2025 at 7:32 pm

    Hi
    I’m not sure about this Section 1 answer of one question . The question mentions that the user posts photos, which means the content is dynamic. However, the correct answer states: “Serve your web app out of an S3 bucket enabled as a website.”

    Why would I need to host the website in S3 if it’s already running in React? Also, how would dynamic content be updated in an S3-hosted bucket?

    • This discussion was modified 1 week, 2 days ago by  Alak.
  • JR-TutorialsDojo

    Administrator
    February 5, 2025 at 10:57 am

    Hello Alak,

    Thank you for your inquiry! I understand that it may seem counterintuitive to host a React application on S3, especially when the app involves dynamic content. Let me clarify how this works:

    The application is built using ReactJS, which generates static files (HTML, CSS, JavaScript) upon build. These static files are served to the client’s browser, where the React code dynamically updates the user interface. Amazon S3 is an ideal solution for hosting static files because it is highly scalable, cost-effective, and designed to serve static content with low latency and high availability. Additionally, S3 can be paired with services like Amazon CloudFront for caching and global content delivery to improve performance.

    Hosting a ReactJS application on S3 involves serving the static assets of your web app, such as HTML, CSS, and JavaScript files, from an S3 bucket. Since React is a client-side framework, all dynamic operations are managed through API calls to backend services, such as Amazon DynamoDB, once the static files are loaded.

    In this setup, dynamic data (captions) is not directly stored within the S3 bucket that hosts the website. Instead, you can use APIs to upload captions to DynamoDB. When users interact with the app, API requests dynamically fetch and display that data. When you make changes to the React application code (e.g., add new features), you will need to rebuild and redeploy the static files to the S3 bucket.

    Hope this helps! Let us know if you need further assistance.

    Regards,
    JR @ Tutorials Dojo

  • Alak

    Member
    February 5, 2025 at 12:03 pm

    Thank you for clarifying

    • JR-TutorialsDojo

      Administrator
      February 5, 2025 at 3:43 pm

      No worries, Alak! Let us know if you need further assistance.

Viewing 1 - 3 of 3 replies

Log in to reply.

Original Post
0 of 0 posts June 2018
Now
Skip to content