项目作者: sirceljm

项目描述 :
AWS Lambda serverless blogging platform
高级语言: JavaScript
项目地址: git://github.com/sirceljm/aws-lambda-blog.git
创建时间: 2016-11-08T17:09:58Z
项目社区:https://github.com/sirceljm/aws-lambda-blog

开源协议:MIT License

下载


I no longer actively develop this project. It was made in a way that it is quite easy to install and run, but not that easy to modify the code and expand on it.

If you are looking for a more developer friendly framework to make serverless web pages on AWS, please look at my other project: https://awly.io

Powered by Amazon Web Services

LambdaBlogPlatform

serverless blogging platform built with AWS

Table of Contents

About" class="reference-link">About

alt tag
AWS Lambda Blog Platform is a complete blogging solution that uses the following Amazon Web Services for operation:

  • API Gateway
  • Lambda
  • DynamoDB
  • S3
  • Cloudfront
  • SES

It runs completely serverless - free of any inflexible hardware infrastructure. The whole system running as a team of small microservices means that the running expenses are without any overhead even at the smallest scale.

Installation prerequisites" class="reference-link">Installation prerequisites

Installation" class="reference-link">Installation

  • Download this repo, unzip and cd to project folder
  • Run npm install
  • Create a new user in IAM
    • [IAM -> Users -> Add User -> Access type -> check Programmatic access]
    • On the last step click on Download .csv file and save the file in project folder
  • Add permissions to the user

    • [IAM -> Users -> your_user -> Permissions -> Add inline policy -> Custom policy]
    • Copy the following JSON and give your inline policy a name
    1. {
    2. "Version": "2012-10-17",
    3. "Statement": [
    4. {
    5. "Sid": "Stmt1481118325000",
    6. "Effect": "Allow",
    7. "Action": [
    8. "iam:CreatePolicy",
    9. "iam:CreateRole",
    10. "iam:GetPolicy",
    11. "iam:GetRole",
    12. "iam:AttachUserPolicy",
    13. "iam:AttachRolePolicy",
    14. "iam:PassRole",
    15. "route53:ListHostedZones",
    16. "acm:ListCertificates",
    17. "iam:ListUserPolicies",
    18. "iam:GetUserPolicy"
    19. ],
    20. "Resource": [
    21. "*"
    22. ]
    23. }
    24. ]
    25. }
  • The install script will add other permissions that are necessary for installation
  • Run node install.js
  • The wizard will take you through the process of installation
  • If everything went smoothly you should see your page after CloudFront changes resolve. This usually takes around 15 minutes.

Advanced installation" class="reference-link">Advanced installation

  • Download this repo, unzip and cd to project folder
  • Run npm install
  • Create a new user in IAM (you will put this user name into install_config.js later)
  • [IAM -> Users -> Add User -> Access type -> check Programmatic access]
  • Copy account keys for the user and make a json file that looks like this:
    user_access_keys

    1. {
    2. "accessKeyId": "AK************",
    3. "secretAccessKey": "BX**********************",
    4. "region": "eu-west-1"
    5. }
    • Add a new inline policy to the user
    • [IAM -> Users -> your_user -> Permissions -> Add inline policy -> Custom policy -> Select -> Copy JSON below and enter a policy name

      1. {
      2. "Version": "2012-10-17",
      3. "Statement": [
      4. {
      5. "Sid": "Stmt1481118325000",
      6. "Effect": "Allow",
      7. "Action": [
      8. "iam:CreatePolicy",
      9. "iam:CreateRole",
      10. "iam:GetPolicy",
      11. "iam:GetRole",
      12. "iam:AttachUserPolicy",
      13. "iam:AttachRolePolicy",
      14. "iam:PassRole",
      15. "route53:ListHostedZones",
      16. "acm:ListCertificates",
      17. "iam:ListUserPolicies",
      18. "iam:GetUserPolicy"
      19. ],
      20. "Resource": [
      21. "*"
      22. ]
      23. }
      24. ]
      25. }

    -> Attach policy]

    • The install script will add other permissions that are necessary for installation
    • Copy and save the Hosted Zone ID for your domain
      alt tag
    • Copy this certificate ARN - and paste it into install_config.js
      alt tag
    • Get your recaptcha key (you can edit this later in API Gateway)
    • Copy install/install_config_template.js to install/install_config.js
    • Change values in install/install_config.js
    • Run node install_advanced.js
    • If everything went smoothly you should see your page after CloudFront changes resolve, which usually takes around 15 minutes