File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -146,6 +146,17 @@ Resources:
146146 !FindInMap [ApiGwConfig, !Ref RunEnvironment, HostedZoneId]
147147 CloudfrontDomain : !GetAtt [AppFrontendCloudfrontDistribution, DomainName]
148148
149+ AppLambdaUrl :
150+ Type : AWS::Lambda::Url
151+ Properties :
152+ AuthType : NONE
153+ Cors :
154+ AllowHeaders : " 'Content-Type,Authorization,X-Amz-Date'"
155+ AllowOrigin : " '*'"
156+ MaxAge : " '300'"
157+ InvokeMode : BUFFERED
158+ TargetFunctionArn : !GetAtt AppApiLambdaFunction.Arn
159+
149160 AppApiLambdaFunction :
150161 Type : AWS::Serverless::Function
151162 DependsOn :
@@ -695,8 +706,8 @@ Resources:
695706 S3OriginConfig :
696707 OriginAccessIdentity : !Sub "origin-access-identity/cloudfront/${CloudFrontOriginAccessIdentity}"
697708 - Id : ApiGatewayOrigin
698- DomainName : !Sub "${AppApiGateway}.execute-api.${AWS::Region}.amazonaws.com"
699- OriginPath : " /default "
709+ DomainName : !GetAtt AppLambdaUrl.FunctionUrl
710+ OriginPath : " /"
700711 CustomOriginConfig :
701712 HTTPPort : 80
702713 HTTPSPort : 443
You can’t perform that action at this time.
0 commit comments