JavaScript Developer Center

Find all the tools, documentation, and sample code you need to develop secure, reliable, and scalable JavaScript applications on the AWS cloud.


Develop

Design and code. Build and test. Run and debug.

Get started building software with the AWS SDK for Node.js library, code samples, and documentation.


Connect

Raise questions. Get answers. Connect to AWS.

Join the community of developers developing secure, reliable, and scalable applications on the AWS cloud. Make the connections that will shift your development into the fast lane.


Learn

Dive deep and discover. Expand and explore.

Read and watch guidance from experts on AWS. See how to get the most from AWS. Find solutions to common challenges. Gain the knowledge to get the most from the AWS cloud.

  • Calling Amazon S3 from JavaScript

    Two features enable making XMLHttpRequest (XHR) calls to Amazon S3 from JavaScript code running in the web browser. The first is Pre-Signed Object URLs, and the second is Amazon S3 support for Cross-Origin Resource Sharing (CORS). When accessing your secured Amazon S3 bucket from the web browser, you do not want to pass your secret AWS credentials down to the browser. Instead, you can create a temporary, pre-signed URL for an object request on the server and transfer it to the JavaScript code running in the browser. This allows using the URL for its specified request for a limited period of time. For information on generating pre-signed object URLs, see the Amazon S3 Developer Guide.

    CORS defines a way for client web applications that are loaded in one domain to interact with resources in another domain. This is needed when a page loaded from your web server needs to make an XHR call to a server in another domain. Amazon S3 supports fine-grain CORS configuration at the bucket level, and this can be used to support cross-domain JavaScript calls to your buckets. To learn how to configure CORS for your buckets, see the Amazon S3 Developer Guide.