버전 비교

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

...

코드 블럭
languageyml
themeRDark
titleDeleteNews Template
linenumberstrue
  DeleteNews:
    Type: 'AWS::Serverless::Function'
    Properties:
      CodeUri: DeleteNews
      Description: Delete news item in DynamoDB Table and mp3 file in S3 bucket.
      Policies:
        - Version: '2012-10-17'
          Statement:
            - Effect: Allow
              Action:
                - 'logs:PutLogEvents'
                - 'logs:CreateLogStream'
                - 'dynamodb:DeleteItem'
                - 's3:DeleteObject'
              Resource: '*'
      Events:
        DeleteNewsApi:
          Type: Api
          Properties:
            Path: /news
            Method: DELETE


코드 블럭
languageyml
themeRDark
titleTemplate_Outpuit
linenumberstrue
Outputs:
  WebsiteURL:
    Description: Name of S3 bucket to hold website content
    Value:
      'Fn::Join':
        - ''
        - - 'https://'
          - 'Fn::GetAtt':
              - StaticWebBucket
              - DomainName
  APIEndpointURL:
    Description: URL of your API endpoint
    Value:
      'Fn::Sub': >-
        https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/news/


코드 블럭
languageyml
themeRDark
titleTemplate_API_CORS
linenumberstrue
  Api:
    # enable CORS; to make more specific, change the origin wildcard
    # to a particular domain name, e.g. "'www.example.com'"
    Cors:
      AllowMethods: "'*'"
      AllowHeaders: "'*'"
      AllowOrigin: "'*'"








SAM(template.yml)에 DynamoDB, SNS, S3(Web, Mp3) 리소스 추가하기

...