Contenu connexe
Similaire à 서버리스 웹 애플리케이션 구축 방법론::김현수:: AWS Summit Seoul 2018
Similaire à 서버리스 웹 애플리케이션 구축 방법론::김현수:: AWS Summit Seoul 2018 (20)
Plus de Amazon Web Services Korea
Plus de Amazon Web Services Korea (20)
서버리스 웹 애플리케이션 구축 방법론::김현수:: AWS Summit Seoul 2018
- 1. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
김현수
솔루션즈 아키텍트 / Amazon Web Services
서버리스 웹 애플리케이션
구축 방법
- 2. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
본 강연에서는
• 서버리스 서비스가 가진 이점을 이해
• 직접 서버리스 서비스로 애플리케이션을 구축하는 방법
• 쉽게 서버리스 서비스 앱을 구축하는 방법
- 3. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
목차
• 서버리스 등장 배경 및 소개
• 서버리스 웹 애플리케이션 개발
• 서버리스 웹 애플리케이션 개발 – 데모 시연
• 서버리스 애플리케이션 리포지토리
• 요약 정리
- 4. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
서버리스 등장 배경 및 소개
- 5. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
어느 개발자의 일상
웹 애플리케이션을 적은 예산으로 빠르게 개발해 주세요.
이후에는 확장 가능하고 관리와 운영은 쉬우면 좋겠어요.
혼자 가능 하시겠어요? 문제 없습니다!
서버리스로 개발하면 됩니다
매니저 개발자
- 6. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
서버에 대한 고민 없이
애플리케이션을 구축 및 작동
서버리스란?
- 7. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
컴퓨팅의 진화 과정
데이터센터에서의
물리 서버
데이터센터에서의
가상 서버
클라우드에서의
가상 서버
- 8. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
컴퓨팅의 진화 과정
데이터센터에서의
물리 서버
데이터센터에서의
가상 서버
클라우드에서의
가상 서버• 활용률 증가
• 프로비저닝 속도 증가
• 높아진 가동 시간
• 재해 복구
• 하드웨어 독립성
• 자본 비용 à 운용 비용
• 높은 확장성
• 탄력적인 리소스
• 빠른 속도와 민첩성
• 유지 보수 비용 감소
• 고가용성과 내결함성
- 9. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
서버가 가진 한계점
데이터센터에서의
가상 서버
클라우드에서의
가상 서버
여전히..
• 가상 서버 관리
• 용량 및 활용률 관리
• 워크로드 사이징
• 고가용성과 내결함성 관리
• 간헐적인 작업 시 비쌈
• 자본 비용 à 운용 비용
• 높은 확장성
• 탄력적인 리소스
• 빠른 속도와 민첩성
• 유지 보수 비용 감소
• 고가용성과 내결함성
- 10. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
서버리스의 이점
서버 관리 불필요 유연한 확장성
유휴 용량 없음
$
고가용성
- 11. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
서버리스 서비스 포트폴리오
Amazon API Gateway
API Proxy
Amazon SNS
Amazon SQS
메시징
AWS Lambda
컴퓨팅
Amazon S3
스토리지
모니터링과 디버깅
AWS X-Ray
오케스트레이션
AWS Step Functions
Amazon Kinesis
분석
Amazon Athena
Amazon DynamoDB
데이터베이스
Amazon Aurora
Serverless (coming soon)
인공지능 서비스
Amazon Polly
Amazon Rekognition
- 12. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
서버리스 서비스 포트폴리오
Amazon API Gateway
API Proxy
Amazon SNS
메시징
AWS Lambda
컴퓨팅
Amazon S3
스토리지
모니터링과 디버깅오케스트레이션
분석
Amazon DynamoDB
데이터베이스
인공지능 서비스
Amazon Polly
- 13. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Lambda를 사용하는 고객들
- 14. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
서버리스 웹 애플리케이션 개발
- 15. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
서버리스 웹 애플리케이션 소개 웹 페이지 구축1
텍스트를 음성으로 요청2
변환된 음성을 재생3
- 16. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Amazon S3
Client
서버리스 웹 애플리케이션 아키텍처 (1/4)
S3를 이용하여 정적 웹 호스팅을
제공한다.
S3로 정적 웹 호스팅
- 17. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Amazon
DynamoDB
(News)
Amazon SNS
(NewNews)
Client
Amazon API Gateway
(POST)
AWS Lambda
(PostNews)
서버리스 웹 애플리케이션 아키텍처 (2/4)
텍스트를 DB에 등록하고, 비동기
처리를 위해 SNS에 등록한다.
텍스트 등록 요청
- 18. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Amazon
DynamoDB
(News)
Amazon PollyAmazon SNS
(NewNews)
MP3 File
Amazon S3
AWS Lambda
(ConvertAudio)
서버리스 웹 애플리케이션 아키텍처 (3/4)
등록된 텍스트를 Amazon Polly로
MP3를 생성하여 저장한다.
텍스트를 음성으로 변환
- 19. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Amazon
DynamoDB
(News)
AWS Lambda
(GetNews)
Amazon API Gateway
(GET)
서버리스 웹 애플리케이션 아키텍처 (4/4)
Polly로 변환한 음성 MP3를
포함한 컨텐츠 정보를 수집
컨텐츠 수집
- 20. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
서버리스 웹 애플리케이션 개발
데모 시연
- 21. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
구축 과정 – DynamoDB, S3, SNS 리소스 생성 (1/4)
Amazon
DynamoDB
(News)
AWS Lambda
(GetNews)
Amazon S3
Amazon Polly
Amazon API Gateway
(GET)
Amazon SNS
(NewNews)
MP3 FileClient
Amazon S3
Amazon API Gateway
(POST)
AWS Lambda
(PostNews)
AWS Lambda
(ConvertAudio)
- 22. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
구축 과정 – IAM 및 Lambda 생성 및 테스트 (2/4)
Amazon
DynamoDB
(News)
AWS Lambda
(GetNews)
Amazon S3
Amazon Polly
Amazon API Gateway
(GET)
Amazon SNS
(NewNews)
MP3 FileClient
Amazon S3
Amazon API Gateway
(POST)
AWS Lambda
(PostNews)
AWS Lambda
(ConvertAudio)
정책
역할
- 23. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
구축 과정 – API Gateway 설정 및 테스트 (3/4)
Amazon
DynamoDB
(News)
AWS Lambda
(GetNews)
Amazon S3
Amazon Polly
Amazon API Gateway
(GET)
Amazon SNS
(NewNews)
MP3 FileClient
Amazon S3
Amazon API Gateway
(POST)
AWS Lambda
(PostNews)
AWS Lambda
(ConvertAudio)
- 24. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
구축 과정 – 정적 웹 호스팅 설정 및 시연 (4/4)
Amazon
DynamoDB
(News)
AWS Lambda
(GetNews)
Amazon S3
Amazon Polly
Amazon API Gateway
(GET)
Amazon SNS
(NewNews)
MP3 FileClient
Amazon S3
Amazon API Gateway
(POST)
AWS Lambda
(PostNews)
AWS Lambda
(ConvertAudio)
- 25. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Amazon
DynamoDB
AWS
Lambda
Amazon
S3
Amazon
Polly
Amazon
API Gateway
Amazon SNS
MP3 FileClient
Amazon
S3
Amazon
API Gateway
AWS
Lambda
AWS
Lambda
AWS
Lambda
Amazon
API GatewayAmazon
Echo
Alexa Skill
Chosun Flash Briefing
고객 사례: 조선일보
- 26. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
서버리스 애플리케이션 리포지토리
서버리스 애플리케이션을 쉽게 검색, 구축, 배포 및 게시
NEW!
- 27. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
서버리스 애플리케이션 리포지토리와의 만남
& 개발자, 회사, 파트너도 제공
Serverless Application Model코드만
템플릿 제공
권한 설정 및 구성의 어려움
업데이트 문제
Github 리포지토리 링크 지원소스 코드 리포지토리 링크 없음
앱을 쉽게 설치
버저닝 및 최신 업데이트 제공1
2
AWS Lambda
- 28. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
서버리스 “설문” 웹 애플리케이션 배포
선택1
검색2
선택3
스택 이름4
배포5
AWS Lambda
- 29. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
서버리스 “설문” 웹 애플리케이션 배포 확인
URL 선택2스택 선택1
AWS Lambda AWS
CloudFormation
- 30. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
서버리스 “설문” 웹 애플리케이션 수정
설문 파일2
파일.함수1 AWS Lambda
- 31. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
서버리스 “설문” 웹 애플리케이션 수정 및 확인
수정 확인2
설문 내용 변경1
DynamoDB 확인3
Amazon
DynamoDB
AWS Lambda
- 32. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
“severless-survey” SAM 템플릿 구조
{
"AWSTemplateFormatVersion":"2010-09-09",
"Outputs": {
"SurveyURL":{
"Description":"Link to your Serverless Survey",
"Value":{"Fn::Sub":"https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/newsurvey"}
}
},
"Resources":{
"SurveyRole":{
"Type":"AWS::IAM::Role",
"Properties":{
"ManagedPolicyArns":["arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole”],
"AssumeRolePolicyDocument":{
"Version":"2012-10-17",
"Statement":[{
"Action":["sts:AssumeRole"],
"Effect":"Allow",
"Principal":{
"Service":["lambda.amazonaws.com"]
}
}]
}
}
},
"ServerlessRestApiProdStage":{
"Type":"AWS::ApiGateway::Stage",
…
최종 배포 Survey URL1
리소스 정의2
Role 정의3
서비스 정의4
- 33. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
서버리스 애플리케이션 리포지토리에 게시
…
- 34. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
요약 정리
- 35. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
요약 정리
전통적인 방법
- 36. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
요약 정리
서버리스 방법
- 37. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
요약 정리
직접 서버리스 웹 애플리케이션 구축
서버리스 애플리케이션 리포지토리에서 찾아서 배포
SAM을 이용한 나만의 리포지토리 생성
전통적인 방법 서버리스 방법
- 38. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
관련 참고 자료
• Amazon Web Service 서버리스 관련 블로그
• https://aws.amazon.com/ko/blogs/korea/category/serverless/
• https://aws.amazon.com/ko/blogs/aws/category/compute/aws-lambda/
• 첫 번째 서버리스 웹 애플리케이션 구축 자습서
• https://aws.amazon.com/ko/serverless/build-a-web-app/
• Amazon Polly를 통한 음성 읽기 서버리스 앱 개발하기
• https://aws.amazon.com/ko/blogs/korea/build-your-own-text-to-speech-applications-with-amazon-polly/
• 서버리스 애플리케이션 리포지토리에 게시
• https://aws.amazon.com/ko/serverless/serverlessrepo/publishing/
- 39. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
AWS Summit 모바일 앱과 QR코드를
통해 강연 평가 및 설문 조사에 참여해
주시기 바랍니다.
내년 Summit을 만들 여러분의 소중한
의견 부탁 드립니다.
#AWSSummit 해시태그로 소셜 미디어에 여러분의 행사
소감을 올려주세요.
발표 자료 및 녹화 동영상은 AWS Korea 공식 소셜 채널로
공유될 예정입니다.
여러분의 피드백을 기다립니다!