项目作者: negibokken

项目描述 :
Simple AWS Lambda sample in TypeScript
高级语言: TypeScript
项目地址: git://github.com/negibokken/aws-lambda-sample-typescript.git
创建时间: 2017-04-25T13:50:19Z
项目社区:https://github.com/negibokken/aws-lambda-sample-typescript

开源协议:MIT License

下载


AWS Lambda Sample

Content

This repository is a simple AWS Lambda sample.

The Lambda function get weather news form livedoor Web API and send push notification via Amazon SNS.

Development tools

  • Node.js v4.3.2
  • Ruby v2.3.3
  • bundler v1.13.6
  • aws cli v1.11.44

Usage

Create Bucket and Resources

  1. Execute below commands

    1. $ npm install
    2. $ npm start
  2. Make S3 bukcet

    1. $ bundle install --path vendor/bundle
    2. $ bundle exec rake s3:create BUCKET={your_bucket_name}
  3. Make CloudFormation template

    1. $ bundle exec rake cfn:create
  4. Execute CloudFormation with template

    1. $ bundle exec rake cfn:execute BUCKET={your_bucket_name}
  5. Add an Amazon SNS subscription

    1. $ bundle exec rake sns:subscribe TOPIC_ARN={your_sns_topic_arn} ENDPOINT={your_email_addresss}

Delete

  • Delete s3 bucket and resources that created by CloudFormation
    1. $ bundle exec rake s3:delete BUCKET={your_bucket_name}
    2. $ bundle exec rake cfn:delete

License

MIT