Giter Club home page Giter Club logo

lab-snspc's Introduction

LAB-SNSPC

Lambda API Backend - Search Naver Shopping Product Code

Introduction

쇼핑몰 상품코드와 매칭되는 네이버 쇼핑의 상품코드를 검색하는 API Gateway lambda backend
검색된 결과는 csv 파일로 다운로드

Version

  • Python: 2.7.6

Utility

Installation

  • install virtualenv
sudo pip install virtualenv
  • activate virtual env
source venv/bin/activate
  • install python package
pip install -r requirements.txt

Message Flow

SET "AWS API Gateway" Method Execution

Reference: https://kennbrodhagen.net/2016/04/02/how-to-return-302-using-api-gateway-lambda/

  1. Create GET method
  2. Modify "Method Request"
  • Add "URL Query String parameters"
  1. Modify "Method Response"
  • Delete the old 200 status (already exist)
  • Add a new response 302
  • Add the Location header
  1. Modify "Integration Response"
  • Delete the old 200 status (already exist)
  • Add a new response 302
  • Set the mapping value (should be "integration.response.body.location")
  • Save mapping value
  • Save status

Configuration

  • config.yaml: python-lambda utility configuration file
    • region: lambda fucntion region
    • function_name: lambda function name
    • handler: lambda function handler
    • role: lambda function role
    • description: lambda function description
    • aws_access_key_id: aws access key
    • aws_secret_access_key: aws sercet key
    • timeout: lambda function timeout seconds
    • memory_size: lambda memory size
  • config.py: lambda function configuration file
    • s3_bucket: s3 bucket name for upload result csv
    • s3_file_prefix: s3 object prefix
    • naver_api_url: naver open api endpoint url
    • naver_api_key: naver open api key
  • event.json: lambda function event values (for test)

lambda Test

  • lambda invoke -v

lambda deployment

  • lambda deploy

lab-snspc's People

Contributors

jinu1215 avatar

Watchers

James Cloos avatar  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.