AWSTemplateFormatVersion: "2010-09-09" Transform: AWS::Serverless-2016-10-31 Globals: Function: MemorySize: 1024 Architectures: [x86_64] Runtime: dotnet6 Timeout: 30 Tracing: Active Environment: Variables: PRODUCT_TABLE_NAME: !Ref Table Resources: MinimalGetProductsFunction: Type: AWS::Serverless::Function Properties: CodeUri: ./ApiBootstrap/ Handler: bootstrap Events: Api: Type: HttpApi Properties: Path: / Method: GET Policies: - Version: "2012-10-17" Statement: - Effect: Allow Action: dynamodb:* Resource: !GetAtt Table.Arn MinimalGetProductFunction: Type: AWS::Serverless::Function Properties: CodeUri: ./ApiBootstrap/ Handler: bootstrap AutoPublishAlias: live ProvisionedConcurrencyConfig: ProvisionedConcurrentExecutions: 10 Events: Api: Type: HttpApi Properties: Path: /{id} Method: GET Policies: - Version: "2012-10-17" Statement: - Effect: Allow Action: dynamodb:* Resource: !GetAtt Table.Arn Table: 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 Outputs: ApiUrl: Description: "API Gateway endpoint URL" Value: !Sub "https://${ServerlessHttpApi}.execute-api.${AWS::Region}.amazonaws.com/"