AWSTemplateFormatVersion: 2010-09-09 Transform: AWS::Serverless-2016-10-31 Resources: HttpApi: Type: AWS::Serverless::HttpApi Properties: DefinitionBody: openapi: '3.0' info: title: !Sub ${AWS::StackName}-HttpApi version: '1.0' paths: /users/{id}: post: responses: {} FailOnWarnings: true Users: Type: AWS::DynamoDB::Table Properties: AttributeDefinitions: - AttributeName: id AttributeType: S BillingMode: PAY_PER_REQUEST KeySchema: - AttributeName: id KeyType: HASH StreamSpecification: StreamViewType: NEW_AND_OLD_IMAGES SaveUser: Type: AWS::Serverless::Function Properties: FunctionName: !Sub ${AWS::StackName}-SaveUser Description: !Sub - Stack ${StackTagName} Environment ${EnvironmentTagName} Function ${ResourceName} - ResourceName: SaveUser CodeUri: src/SaveUser Handler: Function::Function.Function::FunctionHandler Runtime: dotnetcore3.1 MemorySize: 3008 Timeout: 30 Tracing: Active Policies: - AWSXrayWriteOnlyAccess - DynamoDBCrudPolicy: TableName: !Ref Users Events: HttpApiPOSTusersid: Type: HttpApi Properties: Path: /users/{id} Method: POST ApiId: !Ref HttpApi PayloadFormatVersion: '2.0' TimeoutInMillis: 29000 Environment: Variables: TABLE_NAME: !Ref Users TABLE_ARN: !GetAtt Users.Arn Parameters: StackTagName: Type: String Description: Stack Name (injected by Stackery at deployment time) EnvironmentTagName: Type: String Description: Environment Name (injected by Stackery at deployment time)