Skip to content

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,287 @@
{
"Resources": {
"myfnServiceRole7822DC24": {
"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"
]
]
}
]
}
},
"myfn8C66D016": {
"Type": "AWS::Lambda::Function",
"Properties": {
"Code": {
"ZipFile": "exports.handler = awslambda.streamifyResponse(async (event, responseStream, context) => {\n const metadata = {\n statusCode: 200,\n headers: { 'Content-Type': 'text/plain' }\n };\n responseStream = awslambda.HttpResponseStream.from(responseStream, metadata);\n responseStream.write('Hello, ');\n await new Promise(resolve => setTimeout(resolve, 100));\n responseStream.write('streaming ');\n await new Promise(resolve => setTimeout(resolve, 100));\n responseStream.write('world!');\n responseStream.end();\n });"
},
"Handler": "index.handler",
"Role": {
"Fn::GetAtt": [
"myfnServiceRole7822DC24",
"Arn"
]
},
"Runtime": "nodejs24.x"
},
"DependsOn": [
"myfnServiceRole7822DC24"
]
},
"ApiF70053CD": {
"Type": "AWS::ApiGateway::RestApi",
"Properties": {
"Name": "Api"
}
},
"ApiDeploymentB17BE62D7de2852053d3078d3cd07c9ca6f4d12c": {
"Type": "AWS::ApiGateway::Deployment",
"Properties": {
"Description": "Automatically created by the RestApi construct",
"RestApiId": {
"Ref": "ApiF70053CD"
}
},
"DependsOn": [
"ApiPOST9384DEBA"
],
"Metadata": {
"aws:cdk:do-not-refactor": true
}
},
"ApiDeploymentStageprod3EB9684E": {
"Type": "AWS::ApiGateway::Stage",
"Properties": {
"DeploymentId": {
"Ref": "ApiDeploymentB17BE62D7de2852053d3078d3cd07c9ca6f4d12c"
},
"RestApiId": {
"Ref": "ApiF70053CD"
},
"StageName": "prod"
}
},
"ApiPOSTApiPermissionRestApiStreamStackApi1C847828POST2283EDE7": {
"Type": "AWS::Lambda::Permission",
"Properties": {
"Action": "lambda:InvokeFunction",
"FunctionName": {
"Fn::GetAtt": [
"myfn8C66D016",
"Arn"
]
},
"Principal": "apigateway.amazonaws.com",
"SourceArn": {
"Fn::Join": [
"",
[
"arn:",
{
"Ref": "AWS::Partition"
},
":execute-api:",
{
"Ref": "AWS::Region"
},
":",
{
"Ref": "AWS::AccountId"
},
":",
{
"Ref": "ApiF70053CD"
},
"/",
{
"Ref": "ApiDeploymentStageprod3EB9684E"
},
"/POST/"
]
]
}
}
},
"ApiPOSTApiPermissionTestRestApiStreamStackApi1C847828POST8120A27F": {
"Type": "AWS::Lambda::Permission",
"Properties": {
"Action": "lambda:InvokeFunction",
"FunctionName": {
"Fn::GetAtt": [
"myfn8C66D016",
"Arn"
]
},
"Principal": "apigateway.amazonaws.com",
"SourceArn": {
"Fn::Join": [
"",
[
"arn:",
{
"Ref": "AWS::Partition"
},
":execute-api:",
{
"Ref": "AWS::Region"
},
":",
{
"Ref": "AWS::AccountId"
},
":",
{
"Ref": "ApiF70053CD"
},
"/test-invoke-stage/POST/"
]
]
}
}
},
"ApiPOST9384DEBA": {
"Type": "AWS::ApiGateway::Method",
"Properties": {
"AuthorizationType": "NONE",
"HttpMethod": "POST",
"Integration": {
"IntegrationHttpMethod": "POST",
"ResponseTransferMode": "STREAM",
"Type": "AWS_PROXY",
"Uri": {
"Fn::Join": [
"",
[
"arn:",
{
"Ref": "AWS::Partition"
},
":apigateway:",
{
"Ref": "AWS::Region"
},
":lambda:path/2021-11-15/functions/",
{
"Fn::GetAtt": [
"myfn8C66D016",
"Arn"
]
},
"/response-streaming-invocations"
]
]
}
},
"ResourceId": {
"Fn::GetAtt": [
"ApiF70053CD",
"RootResourceId"
]
},
"RestApiId": {
"Ref": "ApiF70053CD"
}
}
}
},
"Outputs": {
"ApiEndpoint4F160690": {
"Value": {
"Fn::Join": [
"",
[
"https://",
{
"Ref": "ApiF70053CD"
},
".execute-api.",
{
"Ref": "AWS::Region"
},
".",
{
"Ref": "AWS::URLSuffix"
},
"/",
{
"Ref": "ApiDeploymentStageprod3EB9684E"
},
"/"
]
]
}
},
"ExportsOutputRefApiF70053CD5653BA4D": {
"Value": {
"Ref": "ApiF70053CD"
},
"Export": {
"Name": "RestApiStreamStack:ExportsOutputRefApiF70053CD5653BA4D"
}
},
"ExportsOutputRefApiDeploymentStageprod3EB9684E9290AA51": {
"Value": {
"Ref": "ApiDeploymentStageprod3EB9684E"
},
"Export": {
"Name": "RestApiStreamStack:ExportsOutputRefApiDeploymentStageprod3EB9684E9290AA51"
}
}
},
"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."
}
]
}
}
}
Loading
Loading