code/sample-app-tracing/template.yaml [23:75]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Resources:
# API Gateway
  Api:
    Type: AWS::Serverless::Api
    Properties:
      StageName: Prod

# Lambda Functions
  getAllItemsFunction:
    Type: AWS::Serverless::Function
    Properties:
      Handler: src/handlers/get-all-items.getAllItemsHandler
      Description: A simple example includes a HTTP get method to get all items from a DynamoDB table.
      Policies:
        - DynamoDBCrudPolicy:
            TableName: !Ref SampleTable
        - CloudWatchPutMetricPolicy: {}
        - CloudWatchLambdaInsightsExecutionRolePolicy
      Events:
        Api:
          Type: Api
          Properties:
            RestApiId: !Ref Api
            Path: /items
            Method: GET
            
  getByIdFunction:
    Type: AWS::Serverless::Function
    Properties:
      Handler: src/handlers/get-by-id.getByIdHandler
      Description: A simple example includes a HTTP get method to get one item by id from a DynamoDB table.
      Policies:
        - DynamoDBCrudPolicy:
            TableName: !Ref SampleTable
        - CloudWatchPutMetricPolicy: {}
        - CloudWatchLambdaInsightsExecutionRolePolicy
      Events:
        Api:
          Type: Api
          Properties:
            RestApiId: !Ref Api
            Path: /items/{id}
            Method: GET
            
  putItemFunction:
    Type: AWS::Serverless::Function
    Properties:
      Handler: src/handlers/put-item.putItemHandler
      Description: A simple example includes a HTTP post method to add one item to a DynamoDB table.
      Policies:
        - DynamoDBCrudPolicy:
            TableName: !Ref SampleTable
        - CloudWatchPutMetricPolicy: {}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



code/sample-app/template.yaml [26:78]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Resources:
# API Gateway
  Api:
    Type: AWS::Serverless::Api
    Properties:
      StageName: Prod

# Lambda Functions
  getAllItemsFunction:
    Type: AWS::Serverless::Function
    Properties:
      Handler: src/handlers/get-all-items.getAllItemsHandler
      Description: A simple example includes a HTTP get method to get all items from a DynamoDB table.
      Policies:
        - DynamoDBCrudPolicy:
            TableName: !Ref SampleTable
        - CloudWatchPutMetricPolicy: {}
        - CloudWatchLambdaInsightsExecutionRolePolicy
      Events:
        Api:
          Type: Api
          Properties:
            RestApiId: !Ref Api
            Path: /items
            Method: GET
            
  getByIdFunction:
    Type: AWS::Serverless::Function
    Properties:
      Handler: src/handlers/get-by-id.getByIdHandler
      Description: A simple example includes a HTTP get method to get one item by id from a DynamoDB table.
      Policies:
        - DynamoDBCrudPolicy:
            TableName: !Ref SampleTable
        - CloudWatchPutMetricPolicy: {}
        - CloudWatchLambdaInsightsExecutionRolePolicy
      Events:
        Api:
          Type: Api
          Properties:
            RestApiId: !Ref Api
            Path: /items/{id}
            Method: GET
            
  putItemFunction:
    Type: AWS::Serverless::Function
    Properties:
      Handler: src/handlers/put-item.putItemHandler
      Description: A simple example includes a HTTP post method to add one item to a DynamoDB table.
      Policies:
        - DynamoDBCrudPolicy:
            TableName: !Ref SampleTable
        - CloudWatchPutMetricPolicy: {}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



