Skip to content

Commit 1f90c18

Browse files
authored
Create apigw-data-validation-tf.json
1 parent d5bd2bc commit 1f90c18

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{
2+
"title": "API Gateway data validation",
3+
"description": "Creates an API Gateway with request validation, rejecting invalid requests before Lambda invocation using model schema validation.",
4+
"language": "YAML",
5+
"level": "300",
6+
"framework": "Terraform",
7+
"introBox": {
8+
"headline": "How it works",
9+
"text": [
10+
"The data model is declared in the API Gateway resource. The Lambda function then requires the request body to be validated against this model."
11+
]
12+
},
13+
"gitHub": {
14+
"template": {
15+
"repoURL": "https://github.com/aws-samples/serverless-patterns/tree/main/apigw-data-validation-tf",
16+
"templateURL": "serverless-patterns/apigw-data-validation-tf",
17+
"projectFolder": "apigw-data-validation-tf",
18+
"templateFile": "main.tf"
19+
}
20+
},
21+
"resources": {
22+
"bullets": [
23+
{
24+
"text": "API Gateway model example",
25+
"link": "https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-resource-api.html#sam-api-models"
26+
},
27+
{
28+
"text": "JSON Schema",
29+
"link": "https://datatracker.ietf.org/doc/html/draft-zyp-json-schema-04#section-4.1"
30+
}
31+
]
32+
},
33+
"deploy": {
34+
"text": [
35+
"terraform init",
36+
"terraform apply"
37+
]
38+
},
39+
"testing": {
40+
"text": [
41+
"See the Github repo for detailed testing instructions."
42+
]
43+
},
44+
"cleanup": {
45+
"text": [
46+
"<code>terraform destroy</code>",
47+
"terraform show"
48+
]
49+
},
50+
"authors": [
51+
{
52+
"name": "Makendran G",
53+
"image": "https://drive.google.com/file/d/1mUObnbmn52UWL-Zn39EpgpneiBNv3LCN/view?usp=sharing",
54+
"bio": "Cloud Support Engineer @ AWS",
55+
"linkedin": "makendran",
56+
"twitter": "@MakendranG"
57+
}
58+
],
59+
"patternArch": {
60+
"icon1": {
61+
"x": 20,
62+
"y": 50,
63+
"service": "internet"
64+
},
65+
"icon2": {
66+
"x": 80,
67+
"y": 50,
68+
"service": "apigw",
69+
"label": "API Gateway REST API"
70+
},
71+
"line1": {
72+
"from": "icon1",
73+
"to": "icon2"
74+
}
75+
}
76+
}

0 commit comments

Comments
 (0)