All Projects → rpstreef → openapi-tf-example

rpstreef / openapi-tf-example

Licence: Apache-2.0 license
Example of how you can use OpenAPI with AWS API Gateway, Also includes integrations with AWSLambda, AWS Cognito, AWS SNS and CloudWatch logs

Programming Languages

HCL
1544 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to openapi-tf-example

terraform-aws-cognito-user-pool
A Terraform module to create and manage Cognito User Pools (Simple and Secure User Sign-Up, Sign-In, and Access Control) on Amazon Web Services (AWS). https://aws.amazon.com/cognito
Stars: ✭ 46 (+21.05%)
Mutual labels:  cognito, terraform-aws
gozeit
GoZeit
Stars: ✭ 19 (-50%)
Mutual labels:  cloudwatch, cognito
Aws Cli Cheatsheet
☁️ AWS CLI + JQ = Make life easier
Stars: ✭ 94 (+147.37%)
Mutual labels:  sns, cognito
sensu-plugins-aws
This plugin provides native AWS instrumentation for monitoring and metrics collection, including: health and metrics for various AWS services, such as EC2, RDS, ELB, and more, as well as handlers for EC2, SES, and SNS.
Stars: ✭ 79 (+107.89%)
Mutual labels:  cloudwatch, sns
go-localstack
Go Wrapper for using localstack
Stars: ✭ 56 (+47.37%)
Mutual labels:  cloudwatch, sns
terraform-aws-ecs-cloudwatch-sns-alarms
Terraform module to create CloudWatch Alarms on ECS Service level metrics.
Stars: ✭ 23 (-39.47%)
Mutual labels:  cloudwatch, sns
terraform-aws-cloudwatch-logs
Terraform Module to Provide a CloudWatch Logs Endpoint
Stars: ✭ 59 (+55.26%)
Mutual labels:  cloudwatch
restish
Restish is a CLI for interacting with REST-ish HTTP APIs with some nice features built-in
Stars: ✭ 453 (+1092.11%)
Mutual labels:  openapi3
Awesome Aws
A curated list of awesome Amazon Web Services (AWS) libraries, open source repos, guides, blogs, and other resources. Featuring the Fiery Meter of AWSome.
Stars: ✭ 9,895 (+25939.47%)
Mutual labels:  cloudwatch
2021-nolto
부담없이 자랑하는 작고 소중한 내 프로젝트 🧸✨
Stars: ✭ 34 (-10.53%)
Mutual labels:  cloudwatch
lawsg
The AWS Cloudwatch Log Viewer
Stars: ✭ 31 (-18.42%)
Mutual labels:  cloudwatch
specifications-ITS-REST
openEHR REST API Specifications
Stars: ✭ 20 (-47.37%)
Mutual labels:  openapi3
parse-oauth2-sns
Parse-server module for implementing an OAuth2 Social Media Login with Express in Node.js
Stars: ✭ 21 (-44.74%)
Mutual labels:  sns
amazon-sns-java-extended-client-lib
This AWS SNS client library allows to publish messages to SNS that exceed the 256 KB message size limit.
Stars: ✭ 23 (-39.47%)
Mutual labels:  sns
aws-o11y-recipes
recipes for observability solutions at AWS
Stars: ✭ 110 (+189.47%)
Mutual labels:  cloudwatch
oas parser
An open source Open API Spec 3 Definition Parser
Stars: ✭ 52 (+36.84%)
Mutual labels:  openapi3
dummy
Run mock server based off an API contract with one command
Stars: ✭ 170 (+347.37%)
Mutual labels:  openapi3
lambda-watchtower
Serverless HTTP(S) Endpoint Monitoring With AWS Lambda & CloudWatch
Stars: ✭ 68 (+78.95%)
Mutual labels:  cloudwatch
openapi-boilerplate
📘 Multi-file boilerplate for Open API Specification
Stars: ✭ 280 (+636.84%)
Mutual labels:  openapi3
oaie-sketch
OpenAPI Visual Editor
Stars: ✭ 54 (+42.11%)
Mutual labels:  openapi3

OpenAPI with AWS API Gateway, Lambda, Cognito, SNS and CloudWatch logs

This repo only deploys the infrastructure via Terraform. The source code, this repo, will be deployed automatically via AWS CodePipeline. By default, it's configured to automatically deploy at every push to the master branch.

Check the companion articles series 'OpenAPI' on dev.to.

Get started

The essentials

  • Download Terraform v0.12.x here
  • You will need Node v12.x from here
  • Git, to clone this Repo, from here
  • Create a free AWS account (requires credit card) here
  • Finally, download the AWS CLI tool
  • Setup your AWS local profile, see this guide how it's done.
  • Manually setup an AWS S3 Bucket for Terraform state storage.

To get the API running

If you meet all the pre-requisites, do the following

  • In your AWS development account create the S3 bucket for your Terraform state files.
    • Optionally, encrypt the S3 bucket and enable versioning such that you can do a rollback.
  • git clone this repo.
  • Change your AWS credentials profile name in these files:
    • ./env/dev/remote-backend.tf
    • ./env/dev/dev.tfvars
  • Run npm install and then execute npm run dev-init, this will:
    • Initialize the Terraform project for the 'dev' environment, and synchronize the state with the cloud stored .tfstate file.
    • If you run it a second time, it will fail on the workspace creation, this is not an issue (the workspace already exists)
  • Run npm run dev-infra to prepare the deployment to your AWS account.
    • Note: this repo contains the node source code that the CodePipeline will deploy to the AWS Lambda and Lambda-layer.
    • Confirm with yes to deploy, anything else will cancel the deployment

See my full guide on dev.to for more information about this project

ps. I'm aware the gulp file doesn't exit nicely, i'm not an expert. Any pull requests or issue reports with pointers is definitely appreciated.

VS Code plugins used

Running costs

There are no costs associated with deploying any of this on AWS, there is Free Tier coverage for limited free use.

The following services are deployed with Terraform;

  • AWS Cognito
  • AWS API Gateway
  • AWS Lambda & Lambda Layer
  • AWS IAM
  • (Added) CloudWatch Alarms, costs will be incurred for enabling Detailed Monitoring for API Gateway (!)
  • (Added) AWS CodePipeline, and CodeBuild with Github as source repository. There's a free tier for:
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].