{ "Resources": { "HelloHandlerServiceRole11EF7C63": { "Type": "AWS::IAM::Role", "Properties": { "AssumeRolePolicyDocument": { "Statement": [ { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": { "Service": "*" } } ], "Version": "2012-10-17" }, "ManagedPolicyArns": "arn:aws:iam::aws:policy" }, "Metadata": { "aws:cdk:path": "hello-cdk-3/HelloHandler/ServiceRole/Resource" } }, "HelloHandler2E4FBA4D": { "Type": "AWS::Lambda::Function", "Properties": { "Code": { "S3Bucket": { "Ref": "AssetParametersb324f9cccd2c7b6f76691f8d4ad627dd9d48d05ba63cbc0b6c23aa8c98a15a4dS3Bucket401E68B8" }, "S3Key": { "Fn::Join": [ "", [ { "Fn::Select": [ 0, { "Fn::Split": [ "||", { "Ref": "AssetParametersb324f9cccd2c7b6f76691f8d4ad627dd9d48d05ba63cbc0b6c23aa8c98a15a4dS3VersionKeyE366AB42" } ] } ] }, { "Fn::Select": [ 1, { "Fn::Split": [ "||", { "Ref": "AssetParametersb324f9cccd2c7b6f76691f8d4ad627dd9d48d05ba63cbc0b6c23aa8c98a15a4dS3VersionKeyE366AB42" } ] } ] } ] ] } }, "Handler": "hello.handler", "Role": { "Fn::GetAtt": [ "HelloHandlerServiceRole11EF7C63", "Arn" ] }, "Runtime": "python3.7" }, "DependsOn": [ "HelloHandlerServiceRole11EF7C63" ], "Metadata": { "aws:cdk:path": "hello-cdk-3/HelloHandler/Resource", "aws:asset:path": "asset.b324f9cccd2c7b6f76691f8d4ad627dd9d48d05ba63cbc0b6c23aa8c98a15a4d", "aws:asset:property": "Code" } }, "EndpointEEF1FD8F": { "Type": "AWS::ApiGateway::RestApi", "Properties": { "Name": "Endpoint" }, "Metadata": { "aws:cdk:path": "hello-cdk-3/Endpoint/Resource" } }, "EndpointDeployment318525DAb462c597ccb914d9fc1c10f664ed81ca": { "Type": "AWS::ApiGateway::Deployment", "Properties": { "RestApiId": { "Ref": "EndpointEEF1FD8F" }, "Description": "Automatically created by the RestApi construct" }, "DependsOn": [ "EndpointproxyANYC09721C5", "Endpointproxy39E2174E", "EndpointANY485C938B" ], "Metadata": { "aws:cdk:path": "hello-cdk-3/Endpoint/Deployment/Resource" } }, "EndpointDeploymentStageprodB78BEEA0": { "Type": "AWS::ApiGateway::Stage", "Properties": { "RestApiId": { "Ref": "EndpointEEF1FD8F" }, "DeploymentId": { "Ref": "EndpointDeployment318525DAb462c597ccb914d9fc1c10f664ed81ca" }, "StageName": "prod" }, "Metadata": { "aws:cdk:path": "hello-cdk-3/Endpoint/DeploymentStage.prod/Resource" } }, "EndpointCloudWatchRoleC3C64E0F": { "Type": "AWS::IAM::Role", "Properties": { "AssumeRolePolicyDocument": { "Statement": [ { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": { "Service": "apigateway.amazonaws.com" } } ], "Version": "2012-10-17" }, "ManagedPolicyArns": [ { "Fn::Join": [ "", [ "arn:", { "Ref": "AWS::Partition" }, ":iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs" ] ] } ] }, "Metadata": { "aws:cdk:path": "hello-cdk-3/Endpoint/CloudWatchRole/Resource" } }, "EndpointAccountB8304247": { "Type": "AWS::ApiGateway::Account", "Properties": { "CloudWatchRoleArn": { "Fn::GetAtt": [ "EndpointCloudWatchRoleC3C64E0F", "Arn" ] } }, "DependsOn": [ "EndpointEEF1FD8F" ], "Metadata": { "aws:cdk:path": "hello-cdk-3/Endpoint/Account" } }, "Endpointproxy39E2174E": { "Type": "AWS::ApiGateway::Resource", "Properties": { "ParentId": { "Fn::GetAtt": [ "EndpointEEF1FD8F", "RootResourceId" ] }, "PathPart": "{proxy+}", "RestApiId": { "Ref": "EndpointEEF1FD8F" } }, "Metadata": { "aws:cdk:path": "hello-cdk-3/Endpoint/Default/{proxy+}/Resource" } }, "EndpointproxyANYApiPermissionhellocdk3Endpoint6984B835ANYproxy93E24486": { "Type": "AWS::Lambda::Permission", "Properties": { "Action": "lambda:InvokeFunction", "FunctionName": { "Fn::GetAtt": [ "HelloHandler2E4FBA4D", "Arn" ] }, "Principal": "apigateway.amazonaws.com", "SourceArn": { "Fn::Join": [ "", [ "arn:", { "Ref": "AWS::Partition" }, ":execute-api:us-east-2:", { "Ref": "AWS::AccountId" }, ":", { "Ref": "EndpointEEF1FD8F" }, "/", { "Ref": "EndpointDeploymentStageprodB78BEEA0" }, "/*/{proxy+}" ] ] } }, "Metadata": { "aws:cdk:path": "hello-cdk-3/Endpoint/Default/{proxy+}/ANY/ApiPermission.hellocdk3Endpoint6984B835.ANY..{proxy+}" } }, "EndpointproxyANYApiPermissionTesthellocdk3Endpoint6984B835ANYproxy899B564D": { "Type": "AWS::Lambda::Permission", "Properties": { "Action": "lambda:InvokeFunction", "FunctionName": { "Fn::GetAtt": [ "HelloHandler2E4FBA4D", "Arn" ] }, "Principal": "apigateway.amazonaws.com", "SourceArn": { "Fn::Join": [ "", [ "arn:", { "Ref": "AWS::Partition" }, ":execute-api:us-east-2:", { "Ref": "AWS::AccountId" }, ":", { "Ref": "EndpointEEF1FD8F" }, "/test-invoke-stage/*/{proxy+}" ] ] } }, "Metadata": { "aws:cdk:path": "hello-cdk-3/Endpoint/Default/{proxy+}/ANY/ApiPermission.Test.hellocdk3Endpoint6984B835.ANY..{proxy+}" } }, "EndpointproxyANYC09721C5": { "Type": "AWS::ApiGateway::Method", "Properties": { "HttpMethod": "ANY", "ResourceId": { "Ref": "Endpointproxy39E2174E" }, "RestApiId": { "Ref": "EndpointEEF1FD8F" }, "AuthorizationType": "NONE", "Integration": { "IntegrationHttpMethod": "POST", "Type": "AWS_PROXY", "Uri": { "Fn::Join": [ "", [ "arn:", { "Ref": "AWS::Partition" }, ":apigateway:us-east-2:lambda:path/2015-03-31/functions/", { "Fn::GetAtt": [ "HelloHandler2E4FBA4D", "Arn" ] }, "/invocations" ] ] } } }, "Metadata": { "aws:cdk:path": "hello-cdk-3/Endpoint/Default/{proxy+}/ANY/Resource" } }, "EndpointANYApiPermissionhellocdk3Endpoint6984B835ANYCDD16A0C": { "Type": "AWS::Lambda::Permission", "Properties": { "Action": "lambda:InvokeFunction", "FunctionName": { "Fn::GetAtt": [ "HelloHandler2E4FBA4D", "Arn" ] }, "Principal": "apigateway.amazonaws.com", "SourceArn": { "Fn::Join": [ "", [ "arn:", { "Ref": "AWS::Partition" }, ":execute-api:us-east-2:", { "Ref": "AWS::AccountId" }, ":", { "Ref": "EndpointEEF1FD8F" }, "/", { "Ref": "EndpointDeploymentStageprodB78BEEA0" }, "/*/" ] ] } }, "Metadata": { "aws:cdk:path": "hello-cdk-3/Endpoint/Default/ANY/ApiPermission.hellocdk3Endpoint6984B835.ANY.." } }, "EndpointANYApiPermissionTesthellocdk3Endpoint6984B835ANY04619EC6": { "Type": "AWS::Lambda::Permission", "Properties": { "Action": "lambda:InvokeFunction", "FunctionName": { "Fn::GetAtt": [ "HelloHandler2E4FBA4D", "Arn" ] }, "Principal": "apigateway.amazonaws.com", "SourceArn": { "Fn::Join": [ "", [ "arn:", { "Ref": "AWS::Partition" }, ":execute-api:us-east-2:", { "Ref": "AWS::AccountId" }, ":", { "Ref": "EndpointEEF1FD8F" }, "/test-invoke-stage/*/" ] ] } }, "Metadata": { "aws:cdk:path": "hello-cdk-3/Endpoint/Default/ANY/ApiPermission.Test.hellocdk3Endpoint6984B835.ANY.." } }, "EndpointANY485C938B": { "Type": "AWS::ApiGateway::Method", "Properties": { "HttpMethod": "ANY", "ResourceId": { "Fn::GetAtt": [ "EndpointEEF1FD8F", "RootResourceId" ] }, "RestApiId": { "Ref": "EndpointEEF1FD8F" }, "AuthorizationType": "NONE", "Integration": { "IntegrationHttpMethod": "POST", "Type": "AWS_PROXY", "Uri": { "Fn::Join": [ "", [ "arn:", { "Ref": "AWS::Partition" }, ":apigateway:us-east-2:lambda:path/2015-03-31/functions/", { "Fn::GetAtt": [ "HelloHandler2E4FBA4D", "Arn" ] }, "/invocations" ] ] } } }, "Metadata": { "aws:cdk:path": "hello-cdk-3/Endpoint/Default/ANY/Resource" } } }, "Parameters": { "AssetParametersb324f9cccd2c7b6f76691f8d4ad627dd9d48d05ba63cbc0b6c23aa8c98a15a4dS3Bucket401E68B8": { "Type": "String", "Description": "S3 bucket for asset \"b324f9cccd2c7b6f76691f8d4ad627dd9d48d05ba63cbc0b6c23aa8c98a15a4d\"" }, "AssetParametersb324f9cccd2c7b6f76691f8d4ad627dd9d48d05ba63cbc0b6c23aa8c98a15a4dS3VersionKeyE366AB42": { "Type": "String", "Description": "S3 key for asset version \"b324f9cccd2c7b6f76691f8d4ad627dd9d48d05ba63cbc0b6c23aa8c98a15a4d\"" }, "AssetParametersb324f9cccd2c7b6f76691f8d4ad627dd9d48d05ba63cbc0b6c23aa8c98a15a4dArtifactHash69919828": { "Type": "String", "Description": "Artifact hash for asset \"b324f9cccd2c7b6f76691f8d4ad627dd9d48d05ba63cbc0b6c23aa8c98a15a4d\"" } }, "Outputs": { "Endpoint8024A810": { "Value": { "Fn::Join": [ "", [ "https://", { "Ref": "EndpointEEF1FD8F" }, ".execute-api.us-east-2.", { "Ref": "AWS::URLSuffix" }, "/", { "Ref": "EndpointDeploymentStageprodB78BEEA0" }, "/" ] ] } } } }