Hi there,
AWS recently launched a new region in my home town - af-south-1 - and both Lambda and API Gateway are supported features. I have successfully deployed a non-api gateway lambda (and invoked it using sls invoke -f {name}
). However I can’t deploy an HttpAPI lambda - I get template validation errors (see below).
Is this a serverless issue? or an AWS af-south-1 region issue? It looks like the the later - i.e. af-south-1 does not support HttpApi. However please confirm so that I can take this up with AWS.
$ serverless deploy -v
...
Serverless: Validating template...
Error --------------------------------------------------
Error: The CloudFormation template is invalid: Template format error: Unrecognized resource types: [AWS::ApiGatewayV2::Stage, AWS::ApiGatewayV2::Route, AWS::ApiGatewayV2::Integration, AWS::ApiGatewayV2::Api]
The compiled-cloudformation-template.json TemplateURL in my deploy bucket has the following content:
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>IllegalLocationConstraintException</Code><Message>The af-south-1 location constraint is incompatible for the region specific endpoint this request was sent to.</Message><RequestId>ED37DF8D4D4F3635</RequestId><HostId>mhp+Cck6l8YElv2CNdAE7mY21eSRyddgZ602QZeBTkkyn0FqTxHZDs6KqtwRG/t7e6r5ihnwdeY=</HostId></Error>