API (AWS) 17

NAVER Developers

네이버 개발https://developers.naver.com/main/ NAVER Developers 네이버 오픈 API들을 활용해 개발자들이 다양한 애플리케이션을 개발할 수 있도록 API 가이드와 SDK를 제공합니다. 제공중인 오픈 API에는 네이버 로그인, 검색, 단축URL, 캡차를 비롯 기계번역, 음 developers.naver.com https://developers.naver.com/docs/papago/README.md 파파고 실행 예 : 안녕하세요 => hello 요청 URL https://openapi.naver.com/v1/papago/n2mt "https://openapi.naver.com/v1/papago/n2mt" request = urllib.request.Request(url..

API (AWS) 2022.01.14

[에러 디버깅] Pandas/ Numpy 가 Lambda에서 실행이 안될때 : Serverless 배포시 502 Bad Gateway에러

문제 : 내컴퓨터 local windows에는 pandas와 같은 라이브러리가 깔려있지만, 배포한 AWS server에는 없는 라이브러리이기 때문에 배포후 에러가 난다. 현상 : 계획 : 해결 과정 : 1. ec2 리눅스에 판다스 넘파이 설치 $ python --version : Python 3.9.7 $ conda create -n 이름짓고 python=3.8 $ conda activate lanbda $ mkdir python $ cd python $ pip install -t . pandas $ rm -r *.dist-info __pycache__ pandas numpy (람다레이어 만들기 참고 블로그) https://korniichuk.medium.com/lambda-with-pandas-fd81..

API (AWS) 2022.01.11

Serverless 설치과정과 CI/CD를 위한 Github Repository 생성 및 연결

pandas/ numpy 라이브러리 처리 ci/cd 설정하기 …or create a new repository on the command line echo "# serverless-flask-memo-server" >> README.md git init git add README.md git commit -m "first commit" git branch -M main git remote add origin https://github.com/pfshin22/serverless-flask-memo-server.git git push -u origin main …or push an existing repository from the command line git remote add origin https:/..

API (AWS) 2022.01.11

AWS Lambda를 이용한 Serverless Applications (이론)

https://aws.amazon.com/ko/serverless/ 서버리스 컴퓨팅 – Amazon Web Services 웹 애플리케이션 웹 애플리케이션 구축 등록된 사용자가 항목을 생성하고 업데이트하고 보고 삭제할 수 있는 단순한 ‘할 일 목록’ 웹 앱을 구축합니다. 이벤트 기반 웹 애플리케이션에서는 A aws.amazon.com https://velog.io/@jeong-god/Python%EA%B3%BC-AWS-S3%EC%97%B0%EB%8F%99%ED%95%98%EA%B8%B0 Python과 AWS S3연동하기 Python과 AWS S3연동하기 velog.io https://nodejs.org/en/ Node.js Node.js® is a JavaScript runtime built on Chr..

API (AWS) 2022.01.10

[python flask] 영화검색하는 api 개발 순서 (movie.py)

1. app.py 에서 경로와 리소스 연결 틀을 만들어준다. 경로 주소(api/v1/movie/search) 먼저 작성 2. class 얼개를 생성 한후 class이름을 app.py 경로 리소스연결에 입력 3. 포스트맨에서 리퀘스트 생성 4. 워크벤치에서 쿼리문 작성 select m.id, m.title, count(r.rating) as cnt, avg(r.rating) as avg from movie m join rating r on m.id = r.movie_id where m.title like '%hi%' group by m.title order by avg desc (# order by는 추가) limit 0, 25; 5. 쿼리문에 sql문 복사 붙여넣기 (# 딕셔너리로 전부 받아서 가져오는 ..

API (AWS) 2022.01.07