AWSTemplateFormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31 Globals: Function: MemorySize: 1024 Architectures: [arm64] Runtime: dotnet6 Timeout: 30 Tracing: Active Resources: StocksConverterFunction: Type: AWS::Serverless::Function Properties: CodeUri: ./src/GetStock/ Handler: GetStock::GetStock.Functions::GetStockById Policies: - DynamoDBReadPolicy: TableName: !Ref StockTable Environment: # More info about Env Vars: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#environment-object Variables: DB_TABLE: !Ref StockTable API_KEY: BASE_API: https://api.apilayer.com/fixer/latest Events: Api: Type: HttpApi Properties: Path: /stock/{StockId} Method: GET StockTable: Type: AWS::Serverless::SimpleTable Properties: PrimaryKey: Name: StockId Type: String ProvisionedThroughput: ReadCapacityUnits: 2 WriteCapacityUnits: 2 Outputs: ApiUrl: Description: "API Gateway endpoint URL" Value: !Sub "https://${ServerlessHttpApi}.execute-api.${AWS::Region}.amazonaws.com/" TableName: Description: "DynamoDB Table Name" Value: !Ref StockTable