mirror of
https://github.com/floci-io/floci.git
synced 2026-11-28 16:11:48 -05:00
fix(lambda): refuse function URLs in GovCloud and China (#5615)
The AWS GovCloud (US) User Guide lists "AWS Lambda Function URLs is not available" (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-lambda.html) and the China guide "Amazon Lambda Function URLs is not available in the China Regions" (https://docs.amazonaws.cn/en_us/aws/latest/userguide/lambda.html), but CreateFunctionUrlConfig created one in every partition, on a host no source publishes for either of them. CreateFunctionUrlConfig now refuses a request whose region is in aws-us-gov or aws-cn with an InvalidParameterValueException, which the lambda model declares for the operation. No source shows AWS's message, so the wording is Floci's own, as for the API Gateway EDGE gate. The AWS::Lambda::Url provisioner creates through the same service method, so a stack in those partitions fails with that error. Get, Update and Delete act on an existing config and are unchanged. The ISO and EUSC partitions are left as they are because no source covers them, and the open question about the function URL host now names only those two. The Java compat suite skips LambdaFunctionUrlTest in those two partitions, so the China partition nightly stays green. Signed-off-by: Hector Ventura <hectorvent@gmail.com>
This commit is contained in:
1 parent
d3999ad416
commit
255162654f
6 files changed
+167
-1
No files matched your search
+4
@@ -6,6 +6,8 @@ import software.amazon.awssdk.services.lambda.LambdaClient;
|
||||
import software.amazon.awssdk.services.lambda.model.*;
|
||||
import software.amazon.awssdk.services.lambda.model.Runtime;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
|
||||
@DisplayName("Lambda Function URL Config")
|
||||
@@ -18,6 +20,8 @@ class LambdaFunctionUrlTest {
|
||||
|
||||
@BeforeAll
|
||||
static void setup() {
|
||||
Assumptions.assumeFalse(List.of("aws-cn", "aws-us-gov").contains(TestFixtures.partition()),
|
||||
"Lambda function URLs are not available in the China and GovCloud partitions");
|
||||
lambda = TestFixtures.lambdaClient();
|
||||
lambda.createFunction(CreateFunctionRequest.builder()
|
||||
.functionName(FUNCTION_NAME)
|
||||
|
||||
Reference in new issue
Block a user