Git Product home page Git Product logo

japanpost_api's Introduction

japanpost_api

日本郵政の郵便番号データを使用した郵便番号検索APIの構築をします。

Getting Started

以下の環境変数を設定してください。

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • AWS_DEFAULT_REGION

VSCode で本プロジェクトを開き、コマンドパレット(Ctrl+Shift+P)から[Dev Containers: Reopen in Container...]を実行し、下記コマンドを実行してください。

tsc src/handler.ts
npx cdk deploy

デプロイ完了です。

構成

API Gateway を Lambda と統合し、Lambda から S3 Select を呼び出して CSV から住所検索をします。

  • API Gateway
  • Lambda
  • S3

infra

詳細

  1. 日本郵政の Web サイトから CSV をダウンロードします。

  2. S3 のバケットを作成し、上記でダウンロードした CSV を配置します。

  3. ラムダを作成し、aws-sdk を使って、S3 Select による住所検索をします。

    • 512 MiB
    • Node 16
  4. 先に作成したバケットの読み取り権限をラムダに付与します。

  5. API Gateway を作成し、上記のラムダと統合します。

japanpost_api's People

Contributors

casl0 avatar

Stargazers

mishimori avatar

Watchers

 avatar

japanpost_api's Issues

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.