Giter VIP home page Giter VIP logo

cdk-api-integrations's Introduction

CDK API INTEGRATIONS

This project is a proof of concept using CDK to build a scalable API that integrates with multiple APIs and SDKs (SDKs forthcoming).

Description

This project automates the deployment of serverless applications using AWS services including Lambda, DynamoDB, and API Gateway. It integrates with external APIs such as OpenWeatherMap, GitHub, Google Geocoding, and Stripe to demonstrate a multifaceted serverless architecture.

SETUP

Obtain API keys from:

  • Google Geocoder service
  • OpenWeatherMap API
  • GitHub API (this also requires a personal access token)
  • Stripe API (they will also give you a private key to use)

CONVERT THE ENV.example file into .env

cp env.example .env

Enter those values into the .env file. Then run the following command:

cdk bootstrap && cdk synth && cdk deploy --all

We use the --all command to deploy all the stacks in the project. Otherwise, you'd enter only the stack that you want to deploy.

The cdk.json file tells the CDK toolkit how to execute your app.

Building and Running the Project

Building the Project

Compile the Go application to ensure all components are correctly set up:

go build -o myapplication

Running Locally

For local testing and debugging:

./myapplication

Deploying to AWS

Deploy your application to the AWS Cloud using the CDK toolkit:

cdk deploy --all

Useful Commands

  • cdk deploy - Deploy this stack to your default AWS account/region.
  • cdk diff - Compare deployed stack with current state.
  • cdk synth - Emits the synthesized CloudFormation template.
  • go test - Run unit tests.

Additional Resources

Contact Information

For help and support, reach out to [email protected].


We've Provided a Makefile

Including a Makefile can streamline the build and deployment process, making it easier to manage complex commands. Here's a simple Makefile template:

.PHONY: install build deploy

install:
	npm install -g aws-cdk
	go mod tidy

build:
	go build -o cdk-api-integrations

deploy:
	cdk deploy --all

run:
	go run ./cdk-api-integrations.go

Usage Instructions for Makefile:

  • Install Dependencies: make install
  • Build the Application: make build
  • Deploy to AWS: make deploy
  • Run Locally: make run

This comprehensive README should guide new users through setting up and using your project effectively, while also ensuring that experienced developers have quick access to the necessary commands and configurations.

cdk-api-integrations's People

Contributors

redbonzai avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.