Static pre-rendered photo-sharing website to share publicly your pictures without needing to run or maintain servers.
The below YouTube video shows how everything works:
/
path in S3 bucket as the origin/website
path in S3 bucket as the origin (the static website static source code)1. Clone the repository
git clone https://github.com/cornelcroi/photo-sharing-website.git
2. Preliminary operations
Admin user email
[email protected]
with your own email address in amplify/backend/boostrap/adminuser/parameters.json
Image resize
sharp
library packaged as Lambda Layer,amplify/backend/function/S3TriggeraXXXX/S3TriggeraXXXX-cloudformation-template.json
.3. Installs the dependencies
npm install
4. Deploy the stack to your AWS account
amplify init
amplify push
amplify publish
Enjoy !
️ You may need to wait a couple of hours after the first deployment so the DNS name of the S3 bucket to be propagated! (if you cannot log in after the deploiment using the temporary password received by email, this must be it, just wait before trying again, there is nothing wrong with the code)
/albums-gallery-template.html <-- template for an album gallery page
/albums-template.html <-- template for list of albums page
/album-item-template.html <-- template for one album used in list of albums page
/photo-item-template.html <-- template for one photo used on album gallery page
<div>
<h2>{ALBUM_NAME}</h2>
<div>{ALBUM_PHOTOS} photos · {ALBUM_DATE}</div>
</div>
I used this repository to build my own website ManBehindLens.com.
AWS Amplify JavaScript library to connect our front end to cloud resources
Amazon Cognito to handle admin sign up authorization
Amazon Simple Storage Service (S3) to store and serve as many photos as I wish to upload,, to host the React.js app assets for our app and to host the static generated website
Amazon CloudFront to store and serve as many photos as our users care to upload, and to host the static assets for our app
Amazon DynamoDB to provide millisecond response times to API queries for album and photo data
AWS AppSync to host a GraphQL API for our front end
AWS Lambda to create photo thumbnails asynchronously in the cloud & to generate the static website on demand
Amazon Rekognition to detect 5 labels for each uploaded photo
Less than a cup of coffee per month