s3_PhotoViewer.html - AWS Code Sample

s3_PhotoViewer.html

<!--Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 ABOUT THIS NODE.JS EXAMPLE: This example works with AWS SDK for JavaScript version 3 (v3), which is pending release. The preview version of the SDK is available at https://github.com/aws/aws-sdk-js-v3. This example is in the 'AWS SDK for JavaScript v3 Developer Guide' at https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/s3-example-photos-view.html. Purpose: s3_PhotoViewer.html demonstrates how to allow viewing of photos in albums stored in an Amazon S3 bucket. Inputs (replace in code): - REGION - TABLE_NAME Running the code: node s3_PhotoViewer.js NOTES: - For the JavaScript code, see s3_PhotoViewer.js. - For IAM role policy and CORS setup, see the AWS SDK for JavaScript Developer Guide topic at https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/s3-example-photos-view.html. --> <!DOCTYPE html> <html> <head> <script type="text/javascript" src="./main.js"></script> </head> <body> <h1>Photo album viewer</h1> <div id="viewer" /> <script> listAlbums(); </script> </body> </html>