버전 비교

  • 이 줄이 추가되었습니다.
  • 이 줄이 삭제되었습니다.
  • 서식이 변경되었습니다.

...

  1. Cloud9을 이용하여 서버리스 애플리케이션을 SAM(Serverless Application Model) 기반으로 개발/테스트/배포 할 수 있습니다. 
    1. Cloud9, SAM, IAM
  2. SAM을 이해하고 서버리스 서비스에 필요한 서비스를 직접 기술 할 수 있습니다.
    1. API Gateway, Lambda, DynamoDB, S3, SNS, Polly
  3. 서버리스 애플리케이션을 AWS Code 시리즈를 이용하여 배포 프로세스를 제작할 수 있습니다.
    1. CodePipeline, CodeCommit, CodeBuild, CloudFormation(SAM), CodeDeploy


실습 비용

ServiceSub ServiceUnitPricingTotalfree tieretc
Cloud9EC2 - t2.micro1 hour$0.0116/Hour$0.0232750hour/month
EBS - 8GB1 month$0.1/GB$0.830GB/month
Lambda-128MB$0.000000208/100ms-100만번 요청
400GB-초
1년 후
지속 제공
API Gateway-
1백만 API 호출당 3.50 USD
처음 10TB에 대해 0.09 USD/GB

호출 100만건
처음 10TB에 대해 0.09 USD/GB


DynamoDB-




Polly-




Cognito-




CodeStar

CodePipeline




CodeCommit




CodeDeploy




CloudFormation(SAM)




s3-





구축하고자 하는 서버리스 웹 애플리케이션에 대한 소개

...

  1. RESTful API의 Delete 메서드를 이용하여 삭제를 요청합니다.1
  2. API Gateway는 뉴스 데이터를 삭제하는 Lambda 함수인 "DeleteNews"를 호출합니다.

아래 실습을 직접 수행하려면 Amazon Polly 서비스가 제공되는 지역을 선택하십시오. (이 예제는 Cloud9이 존재하는 Singapore 리전에서 English 언어로 진행합니다.)

...



실습

이 예제는 Cloud9이 존재하는 Singapore 리전에서 English 언어로 진행합니다.

실습은 다음과 같은 순서로 진행됩니다.


Lab1. Cloud 9을 이용한 웹 애플리케이션 구축 실습

...

  1. 정적 웹 호스팅 파일 다운로드 받기

    코드 블럭
    languagebash
    themeRDark
    linenumberstrue
    wget https://s3.ap-northeast-2.amazonaws.com/polly.awsdemokr.com/301_static_web.zip


  2. 축 풀고 폴더 이동

    코드 블럭
    languagebash
    themeRDark
    linenumberstrue
    unzip 301_static_web.zip
    cd 301_static_web


  3. Cloud9에서 scripts.js 파일 열어서 CloudFormation Stack에 배포된 Output의 APIEndpointURL 값을 소스코드에 반영 (WebsiteURL이 아니므로 주의)

    코드 블럭
    languagejs
    themeRDark
    linenumberstrue
    var API_ENDPOINT = "https://xxxxxxxxxx.execute-api.ap-southeast-1.amazonaws.com/Prod/news/";
    if (API_ENDPOINT === "")
    {
            alert("scripts.js 파일의 상단에 API Gateway에 배포한 URL을 등록하고 실행하세요.");
    }


  4. 정적 웹 포스팅하고자 하는 S3 버킷에 public-read 권한으로 파일을 업로드 (CloudFormation Stack에 배포된 Output의 S3WebBucket 값을 아래에 대체)

    코드 블럭
    languagebash
    themeRDark
    linenumberstrue
    aws s3 sync . s3://cloud9-webapp-staticwebbucket-xxxxxxxxxxxx --acl public-read


  5. 웹 브라우저로 정적 웹 페이지에 접속 (CloudFormation Stack에 배포된 Output의 WebsiteURL 값을 웹 브라우저 주소창에 입력)
    1. https://cloud9-webapp-staticwebbucket-xxxxxxxxxxxx.s3.amazonaws.com

...