AWSTemplateFormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31 Description: AWS Serverless Quarkus HTTP - com.amazon::LambdaQuarkus Resources: ApiGatewayApi: Type: AWS::Serverless::Api Properties: StageName: prod LambdaQuarkusFunction: Type: AWS::Serverless::Function Properties: Handler: not.used.in.provided.runtime Runtime: provided CodeUri: target/function.zip MemorySize: 256 Policies: - DynamoDBCrudPolicy: TableName: Users Timeout: 15 Environment: Variables: # see https://quarkus.io/guides/amazon-lambda-http DISABLE_SIGNAL_HANDLERS: true Events: LambdaQuarkusGetAll: Type: Api Properties: RestApiId: !Ref ApiGatewayApi Path: /users Method: GET LambdaQuarkusGetUser: Type: Api Properties: RestApiId: !Ref ApiGatewayApi Path: /users/{userId} Method: GET LambdaQuarkusDeleteUser: Type: Api Properties: RestApiId: !Ref ApiGatewayApi Path: /users/{userId} Method: DELETE LambdaQuarkusAddUser: Type: Api Properties: RestApiId: !Ref ApiGatewayApi Path: /users Method: POST UsersTable: Type: AWS::DynamoDB::Table Properties: TableName: Users BillingMode: PAY_PER_REQUEST AttributeDefinitions: - AttributeName: userId AttributeType: S KeySchema: - AttributeName: userId KeyType: HASH Outputs: ApiUrl: Description: URL of the users listing in the prod stage Value: !Sub "https://${ApiGatewayApi}.execute-api.${AWS::Region}.amazonaws.com/prod/users"