a password secured serverless static image/video gallery based on AWS
MIT License
password protected Image/Video Gallery built ontop of AWS Services
this Project started as a simple Terraform Port of AWSPics, so most ideas comes from there.
use these credentials: demouser
: demouser
.htaccess
frontmatter
Docker for building the lambda functions
a certificate for your domain
or certdomain
should already exists (in us-east-1
for cloudfront)
the encrypted cloudfront private key
create and download a cloudfront private key here, note the ID
put the absolute path to file into the variable cloudfront_private_key_file
put the key_pair ID into cloudfront_key_pair
thats needed to generate signed cloudfront cookies and the ability to login
a user in your AWS Cognito User Pool after the stack is initially completed
so your users can login
//terraform.tfvars
domain = "gallery-demo.digitalkaoz.net"
region = "eu-central-1"
certdomain = "digitalkaoz.net" #only if your domain is a subdomain
cloudfront_key_pair = "XYZ"
cloudfront_private_key_file = "/path/to/cloudfront_private_key.pem"
website_config = {
title = "website title"
subline = "sub headline"
short_code = "the websites short name"
author = "the author"
}
//main.tf
provider "aws" {
region = "eu-central-1"
profile = "default"
version = "~> 1.11"
}
provider "aws" {
alias = "us"
region = "us-east-1"
profile = "default"
version = "~> 1.11"
}
module "ssl_private_image_gallery" {
source = "github.com/digitalkaoz/tf-private-static-image-video-gallery"
region = "${var.region}"
domain = "${var.domain}"
certdomain = "${var.certdomain}"
cloudfront_key_pair = "${var.cloudfront_key_pair}"
cloudfront_private_key_file = "${var.cloudfront_private_key_file}"
website_config = "${var.website_config}"
}
you have to wait until your Cloudfront Distribution is done deploying, so grab a coffee (~20min) before going on
simply drop your files (categorized by folders) inside the source
bucket into the folder original
simply create a markdown file inside the folder named post.md
simply create them inside AWS Cognito
html.js
and hardcoded static/main.css