Created
January 31, 2025 19:22
-
-
Save rahilb/7da6d61b13c41a0b74aa08afbfa6d9a8 to your computer and use it in GitHub Desktop.
SAM configuration for Quarkus http REST EDGE API Gateway with custom domain
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: '2010-09-09' | |
Transform: AWS::Serverless-2016-10-31 | |
Description: AWS Serverless Quarkus HTTP - thriftdrop-api-0.0.1 | |
Globals: | |
Api: | |
BinaryMediaTypes: | |
- "*/*" | |
Parameters: | |
FQDN: | |
Type: String | |
Description: Fully qualified domain name | |
ZoneId: | |
Type: String | |
Description: Route53 Zone ID | |
CertificateARN: | |
Type: String | |
Description: Certificate ARN # must be in us-east-1 for EDGE | |
Resources: | |
RestApiGateway: | |
Type: AWS::Serverless::Api | |
Properties: | |
StageName: Prod | |
EndpointConfiguration: | |
Type: EDGE | |
Domain: | |
DomainName: !Ref FQDN | |
CertificateArn: !Ref CertificateARN | |
EndpointConfiguration: EDGE | |
Route53: | |
HostedZoneId: !Ref ZoneId | |
MyApi: | |
Type: AWS::Serverless::Function | |
Properties: | |
Handler: io.quarkus.amazon.lambda.runtime.QuarkusStreamHandler::handleRequest | |
Runtime: java17 | |
CodeUri: target/function.zip | |
MemorySize: 512 | |
Policies: AWSLambdaBasicExecutionRole | |
Timeout: 15 | |
Events: | |
GetResource: | |
Type: Api | |
Properties: | |
RestApiId: !Ref RestApiGateway | |
Path: /{proxy+} | |
Method: any | |
Outputs: | |
MyApi: | |
Description: URL for application | |
Value: !Sub 'https://${FQDN}' | |
Export: | |
Name: Api |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment