Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(appsync): add maxBatchSize property to the AppSyncFunction Construct #30266

Merged
merged 12 commits into from
Jun 13, 2024
Merged

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
{
"Resources": {
"LambdaAPID6A5A92B": {
"Type": "AWS::AppSync::GraphQLApi",
"Properties": {
"AuthenticationType": "API_KEY",
"Name": "LambdaAPI"
}
},
"LambdaAPISchemaCC5CA3D2": {
"Type": "AWS::AppSync::GraphQLSchema",
"Properties": {
"ApiId": {
"Fn::GetAtt": [
"LambdaAPID6A5A92B",
"ApiId"
]
},
"Definition": "schema {\n query: Query\n mutation: Mutation\n}\n\ntype Query {\n getPost(id:ID!): Post\n allPosts: [Post]\n}\n\ntype Mutation {\n addPost(id: ID!, author: String!, title: String, content: String, url: String): Post!\n}\n\ntype Post {\n id: ID!\n author: String!\n title: String\n content: String\n url: String\n ups: Int\n downs: Int\n relatedPosts: [Post]\n relatedPostsMaxBatchSize: [Post]\n}"
}
},
"LambdaAPIDefaultApiKey15F6897D": {
"Type": "AWS::AppSync::ApiKey",
"Properties": {
"ApiId": {
"Fn::GetAtt": [
"LambdaAPID6A5A92B",
"ApiId"
]
}
},
"DependsOn": [
"LambdaAPISchemaCC5CA3D2"
]
},
"LambdaAPILambdaDSServiceRole21CACDF8": {
"Type": "AWS::IAM::Role",
"Properties": {
"AssumeRolePolicyDocument": {
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": "appsync.amazonaws.com"
}
}
],
"Version": "2012-10-17"
}
}
},
"LambdaAPILambdaDSServiceRoleDefaultPolicyFB1B9CE8": {
"Type": "AWS::IAM::Policy",
"Properties": {
"PolicyDocument": {
"Statement": [
{
"Action": "lambda:InvokeFunction",
"Effect": "Allow",
"Resource": [
{
"Fn::GetAtt": [
"funcC3A0C2E2",
"Arn"
]
},
{
"Fn::Join": [
"",
[
{
"Fn::GetAtt": [
"funcC3A0C2E2",
"Arn"
]
},
":*"
]
]
}
]
}
],
"Version": "2012-10-17"
},
"PolicyName": "LambdaAPILambdaDSServiceRoleDefaultPolicyFB1B9CE8",
"Roles": [
{
"Ref": "LambdaAPILambdaDSServiceRole21CACDF8"
}
]
}
},
"LambdaAPILambdaDSFD6DF39B": {
"Type": "AWS::AppSync::DataSource",
"Properties": {
"ApiId": {
"Fn::GetAtt": [
"LambdaAPID6A5A92B",
"ApiId"
]
},
"LambdaConfig": {
"LambdaFunctionArn": {
"Fn::GetAtt": [
"funcC3A0C2E2",
"Arn"
]
}
},
"Name": "LambdaDS",
"ServiceRoleArn": {
"Fn::GetAtt": [
"LambdaAPILambdaDSServiceRole21CACDF8",
"Arn"
]
},
"Type": "AWS_LAMBDA"
}
},
"LambdaAPITestFunction64FA697F": {
"Type": "AWS::AppSync::FunctionConfiguration",
"Properties": {
"ApiId": {
"Fn::GetAtt": [
"LambdaAPID6A5A92B",
"ApiId"
]
},
"DataSourceName": "LambdaDS",
"FunctionVersion": "2018-05-29",
"MaxBatchSize": 10,
"Name": "test"
},
"DependsOn": [
"LambdaAPILambdaDSFD6DF39B",
"LambdaAPISchemaCC5CA3D2"
]
},
"funcServiceRoleA96CCB44": {
"Type": "AWS::IAM::Role",
"Properties": {
"AssumeRolePolicyDocument": {
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": "lambda.amazonaws.com"
}
}
],
"Version": "2012-10-17"
},
"ManagedPolicyArns": [
{
"Fn::Join": [
"",
[
"arn:",
{
"Ref": "AWS::Partition"
},
":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
]
]
}
]
}
},
"funcC3A0C2E2": {
"Type": "AWS::Lambda::Function",
"Properties": {
"Code": {
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"S3Key": "df9f207d681056c35badb6bc0d60a945b44c887b227b759715fd6a6443486443.zip"
},
"Handler": "lambda-tutorial.handler",
"Role": {
"Fn::GetAtt": [
"funcServiceRoleA96CCB44",
"Arn"
]
},
"Runtime": "nodejs18.x"
},
"DependsOn": [
"funcServiceRoleA96CCB44"
]
}
},
"Parameters": {
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
"Default": "/cdk-bootstrap/hnb659fds/version",
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
}
},
"Rules": {
"CheckBootstrapVersion": {
"Assertions": [
{
"Assert": {
"Fn::Not": [
{
"Fn::Contains": [
[
"1",
"2",
"3",
"4",
"5"
],
{
"Ref": "BootstrapVersion"
}
]
}
]
},
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
}
]
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading