...
"GetNews" Lambda 함수 생성
- 가나다
- 가나다
- 가나다
"DeleteNews" Lambda 함수 생성
- 가나다
- 가나다
- 가나다
S3 정적 컨텐츠 업로드
- 가나다
정적 웹 호스팅 파일 다운로드 받기
코드 블럭 language bash theme RDark linenumbers true wget https://s3.ap-northeast-2.amazonaws.com/polly.awsdemokr.com/301_static_web.zip
압축 풀고 폴더 이동
코드 블럭 language bash theme RDark linenumbers true unzip 301_static_web.zip cd 301_static_web
Cloud9에서 scripts.js 파일 열어서 CloudFormation Stack에 배포된 Output의 APIEndpointURL 값을 소스코드에 반영 (WebsiteURL이 아니므로 주의)
코드 블럭 language js theme RDark linenumbers true var API_ENDPOINT = "https://xxxxxxxxxx.execute-api.ap-southeast-1.amazonaws.com/Prod/news/"; if (API_ENDPOINT === "") { alert("scripts.js 파일의 상단에 API Gateway에 배포한 URL을 등록하고 실행하세요."); }
정적 웹 포스팅하고자 하는 S3 버킷에 public-read 권한으로 파일을 업로드 (CloudFormation Stack에 배포된 Output의 S3WebBucket 값을 아래에 대체)
코드 블럭 language bash theme RDark linenumbers true aws s3 sync . s3://cloud9-webapp-staticwebbucket-xxxxxxxxxxxx --acl public-read
- 웹 브라우저로 정적 웹 페이지에 접속 (CloudFormation Stack에 배포된 Output의 WebsiteURL 값을 웹 브라우저 주소창에 입력)
...