@@ -119,6 +119,7 @@ Resources:
119119        GWApiId : !Ref AppApiGateway 
120120        GWHostedZoneId :
121121          !FindInMap [ApiGwConfig, !Ref RunEnvironment, HostedZoneId] 
122+         CloudfrontDomain : !GetAtt [AppFrontendCloudfrontDistribution, DomainName] 
122123
123124  LinkryDomainProxy :
124125    Type : AWS::Serverless::Application 
@@ -138,6 +139,7 @@ Resources:
138139        GWApiId : !Ref AppApiGateway 
139140        GWHostedZoneId :
140141          !FindInMap [ApiGwConfig, !Ref RunEnvironment, HostedZoneId] 
142+         CloudfrontDomain : !GetAtt [AppFrontendCloudfrontDistribution, DomainName] 
141143
142144  CoreUrlProd :
143145    Type : AWS::Serverless::Application 
@@ -158,6 +160,7 @@ Resources:
158160        GWApiId : !Ref AppApiGateway 
159161        GWHostedZoneId :
160162          !FindInMap [ApiGwConfig, !Ref RunEnvironment, HostedZoneId] 
163+         CloudfrontDomain : !GetAtt [AppFrontendCloudfrontDistribution, DomainName] 
161164
162165  AppApiLambdaFunction :
163166    Type : AWS::Serverless::Function 
@@ -306,6 +309,30 @@ Resources:
306309        - AttributeName : userEmail 
307310          KeyType : HASH 
308311
312+   RateLimiterTable :
313+     Type : " AWS::DynamoDB::Table" 
314+     DeletionPolicy : " Delete" 
315+     UpdateReplacePolicy : " Delete" 
316+     Properties :
317+       BillingMode : " PAY_PER_REQUEST" 
318+       TableName : infra-core-api-rate-limiter 
319+       DeletionProtectionEnabled : true 
320+       PointInTimeRecoverySpecification :
321+         PointInTimeRecoveryEnabled : false 
322+       AttributeDefinitions :
323+         - AttributeName : PK 
324+           AttributeType : S 
325+         - AttributeName : SK 
326+           AttributeType : S 
327+       KeySchema :
328+         - AttributeName : PK 
329+           KeyType : HASH 
330+         - AttributeName : SK 
331+           KeyType : RANGE 
332+       TimeToLiveSpecification :
333+         AttributeName : ttl 
334+         Enabled : true 
335+ 
309336  EventRecordsTable :
310337    Type : " AWS::DynamoDB::Table" 
311338    DeletionPolicy : " Retain" 
@@ -562,6 +589,20 @@ Resources:
562589            - ApiGwConfig 
563590            - !Ref  RunEnvironment 
564591            - UiDomainName 
592+           - !Join 
593+             - " " 
594+             - - "go." 
595+               - !FindInMap 
596+                 - ApiGwConfig 
597+                 - !Ref  RunEnvironment 
598+                 - EnvDomainName 
599+           - !Join 
600+             - " " 
601+             - - "ical." 
602+               - !FindInMap 
603+                 - ApiGwConfig 
604+                 - !Ref  RunEnvironment 
605+                 - EnvDomainName 
565606
566607        DefaultCacheBehavior :
567608          TargetOriginId : S3WebsiteOrigin 
@@ -578,6 +619,50 @@ Resources:
578619              Forward : none 
579620          CachePolicyId : 658327ea-f89d-4fab-a63d-7e88639e58f6  #  caching-optimized
580621        CacheBehaviors :
622+           - PathPattern : " /api/v1/events" 
623+             TargetOriginId : ApiGatewayOrigin 
624+             ViewerProtocolPolicy : redirect-to-https 
625+             AllowedMethods :
626+               - GET 
627+               - HEAD 
628+               - OPTIONS 
629+               - PUT 
630+               - POST 
631+               - DELETE 
632+               - PATCH 
633+             CachedMethods :
634+               - GET 
635+               - HEAD 
636+             ForwardedValues :
637+               QueryString : true 
638+               QueryStringCacheKeys :
639+                 - host 
640+                 - ts 
641+                 - upcomingOnly 
642+               Cookies :
643+                 Forward : none 
644+           - PathPattern : " /api/v1/events/*" 
645+             TargetOriginId : ApiGatewayOrigin 
646+             ViewerProtocolPolicy : redirect-to-https 
647+             AllowedMethods :
648+               - GET 
649+               - HEAD 
650+               - OPTIONS 
651+               - PUT 
652+               - POST 
653+               - DELETE 
654+               - PATCH 
655+             CachedMethods :
656+               - GET 
657+               - HEAD 
658+             ForwardedValues :
659+               QueryString : true 
660+               QueryStringCacheKeys :
661+                 - host 
662+                 - ts 
663+                 - upcomingOnly 
664+               Cookies :
665+                 Forward : none 
581666          - PathPattern : " /api/*" 
582667            TargetOriginId : ApiGatewayOrigin 
583668            ViewerProtocolPolicy : redirect-to-https 
0 commit comments