AWSTemplateFormatVersion: "2010-09-09" Transform: AWS::Serverless-2016-10-31 Description: A simple stack to showcase X-Ray integration. Globals: Function: Runtime: python3.7 MemorySize: 1024 Environment: Variables: TABLE_NAME: !Ref Table Tracing: Active Api: TracingEnabled: true Resources: GetItemFunction: Type: AWS::Serverless::Function Properties: CodeUri: ./functions/ Handler: main.get_handler Events: Get: Type: Api Properties: Path: /{name} Method: GET Policies: - DynamoDBReadPolicy: TableName: !Ref Table PutItemFunction: Type: AWS::Serverless::Function Properties: CodeUri: ./functions/ Handler: main.put_handler Events: Get: Type: Api Properties: Path: /{name} Method: PUT Policies: - DynamoDBCrudPolicy: TableName: !Ref Table Table: Type: AWS::Serverless::SimpleTable Outputs: ApiUrl: Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod"