cdk-cost-analyzer 0.1.43 → 0.1.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cdk-cost-analyzer-cache/metadata.json +8 -8
- package/dist/releasetag.txt +1 -1
- package/examples/single-template-usage.js +1 -1
- package/package.json +1 -1
- package/demo/.cdk-cost-analyzer.yaml +0 -68
- package/demo/LICENSE +0 -202
- package/demo/README.md +0 -194
- package/demo/cdk.json +0 -22
- package/demo/cdk.out.1/cdk.out +0 -1
- package/demo/cdk.out.1/demo-dev.assets.json +0 -21
- package/demo/cdk.out.1/manifest.json +0 -741
- package/demo/cdk.out.1/tree.json +0 -1
- package/demo/cdk.out.2/cdk.out +0 -1
- package/demo/cdk.out.2/demo-dev.assets.json +0 -21
- package/demo/cdk.out.2/manifest.json +0 -867
- package/demo/cdk.out.2/tree.json +0 -1
- package/demo/cdk.out.3/cdk.out +0 -1
- package/demo/cdk.out.3/demo-dev.assets.json +0 -21
- package/demo/cdk.out.3/manifest.json +0 -950
- package/demo/cdk.out.3/tree.json +0 -1
- package/demo/package.json +0 -99
- package/demo/scripts/seed-slogans.js +0 -55
- package/demo/yarn.lock +0 -4801
- /package/{demo/cdk.out.1/demo-dev.template.json → examples/fixtures/demo-dev-v1.template.json} +0 -0
- /package/{demo/cdk.out.2/demo-dev.template.json → examples/fixtures/demo-dev-v2.template.json} +0 -0
- /package/{demo/cdk.out.3/demo-dev.template.json → examples/fixtures/demo-dev-v3.template.json} +0 -0
package/demo/cdk.out.3/tree.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":"tree-0.1","tree":{"id":"App","path":"","constructInfo":{"fqn":"aws-cdk-lib.App","version":"2.235.0"},"children":{"demo-dev":{"id":"demo-dev","path":"demo-dev","constructInfo":{"fqn":"aws-cdk-lib.Stack","version":"2.235.0"},"children":{"EcsVpc":{"id":"EcsVpc","path":"demo-dev/EcsVpc","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.Vpc","version":"2.235.0","metadata":[]},"children":{"Resource":{"id":"Resource","path":"demo-dev/EcsVpc/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnVPC","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::VPC","aws:cdk:cloudformation:props":{"cidrBlock":"10.0.0.0/16","enableDnsHostnames":true,"enableDnsSupport":true,"instanceTenancy":"default","tags":[{"key":"Name","value":"demo-dev/EcsVpc"}]}}},"PublicSubnet1":{"id":"PublicSubnet1","path":"demo-dev/EcsVpc/PublicSubnet1","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.PublicSubnet","version":"2.235.0","metadata":[]},"children":{"Subnet":{"id":"Subnet","path":"demo-dev/EcsVpc/PublicSubnet1/Subnet","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnSubnet","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::Subnet","aws:cdk:cloudformation:props":{"availabilityZone":{"Fn::Select":[0,{"Fn::GetAZs":""}]},"cidrBlock":"10.0.0.0/18","mapPublicIpOnLaunch":true,"tags":[{"key":"aws-cdk:subnet-name","value":"Public"},{"key":"aws-cdk:subnet-type","value":"Public"},{"key":"Name","value":"demo-dev/EcsVpc/PublicSubnet1"}],"vpcId":{"Ref":"EcsVpcCEF3634B"}}}},"Acl":{"id":"Acl","path":"demo-dev/EcsVpc/PublicSubnet1/Acl","constructInfo":{"fqn":"aws-cdk-lib.Resource","version":"2.235.0","metadata":[]}},"RouteTable":{"id":"RouteTable","path":"demo-dev/EcsVpc/PublicSubnet1/RouteTable","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnRouteTable","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::RouteTable","aws:cdk:cloudformation:props":{"tags":[{"key":"Name","value":"demo-dev/EcsVpc/PublicSubnet1"}],"vpcId":{"Ref":"EcsVpcCEF3634B"}}}},"RouteTableAssociation":{"id":"RouteTableAssociation","path":"demo-dev/EcsVpc/PublicSubnet1/RouteTableAssociation","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::SubnetRouteTableAssociation","aws:cdk:cloudformation:props":{"routeTableId":{"Ref":"EcsVpcPublicSubnet1RouteTable3F836709"},"subnetId":{"Ref":"EcsVpcPublicSubnet1Subnet4FC26CFD"}}}},"DefaultRoute":{"id":"DefaultRoute","path":"demo-dev/EcsVpc/PublicSubnet1/DefaultRoute","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnRoute","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::Route","aws:cdk:cloudformation:props":{"destinationCidrBlock":"0.0.0.0/0","gatewayId":{"Ref":"EcsVpcIGWF80402C4"},"routeTableId":{"Ref":"EcsVpcPublicSubnet1RouteTable3F836709"}}}},"EIP":{"id":"EIP","path":"demo-dev/EcsVpc/PublicSubnet1/EIP","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnEIP","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::EIP","aws:cdk:cloudformation:props":{"domain":"vpc","tags":[{"key":"Name","value":"demo-dev/EcsVpc/PublicSubnet1"}]}}},"NATGateway":{"id":"NATGateway","path":"demo-dev/EcsVpc/PublicSubnet1/NATGateway","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnNatGateway","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::NatGateway","aws:cdk:cloudformation:props":{"allocationId":{"Fn::GetAtt":["EcsVpcPublicSubnet1EIP97CC60E8","AllocationId"]},"subnetId":{"Ref":"EcsVpcPublicSubnet1Subnet4FC26CFD"},"tags":[{"key":"Name","value":"demo-dev/EcsVpc/PublicSubnet1"}]}}}}},"PublicSubnet2":{"id":"PublicSubnet2","path":"demo-dev/EcsVpc/PublicSubnet2","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.PublicSubnet","version":"2.235.0","metadata":[]},"children":{"Subnet":{"id":"Subnet","path":"demo-dev/EcsVpc/PublicSubnet2/Subnet","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnSubnet","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::Subnet","aws:cdk:cloudformation:props":{"availabilityZone":{"Fn::Select":[1,{"Fn::GetAZs":""}]},"cidrBlock":"10.0.64.0/18","mapPublicIpOnLaunch":true,"tags":[{"key":"aws-cdk:subnet-name","value":"Public"},{"key":"aws-cdk:subnet-type","value":"Public"},{"key":"Name","value":"demo-dev/EcsVpc/PublicSubnet2"}],"vpcId":{"Ref":"EcsVpcCEF3634B"}}}},"Acl":{"id":"Acl","path":"demo-dev/EcsVpc/PublicSubnet2/Acl","constructInfo":{"fqn":"aws-cdk-lib.Resource","version":"2.235.0","metadata":[]}},"RouteTable":{"id":"RouteTable","path":"demo-dev/EcsVpc/PublicSubnet2/RouteTable","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnRouteTable","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::RouteTable","aws:cdk:cloudformation:props":{"tags":[{"key":"Name","value":"demo-dev/EcsVpc/PublicSubnet2"}],"vpcId":{"Ref":"EcsVpcCEF3634B"}}}},"RouteTableAssociation":{"id":"RouteTableAssociation","path":"demo-dev/EcsVpc/PublicSubnet2/RouteTableAssociation","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::SubnetRouteTableAssociation","aws:cdk:cloudformation:props":{"routeTableId":{"Ref":"EcsVpcPublicSubnet2RouteTable259A8B2D"},"subnetId":{"Ref":"EcsVpcPublicSubnet2Subnet127B1F4A"}}}},"DefaultRoute":{"id":"DefaultRoute","path":"demo-dev/EcsVpc/PublicSubnet2/DefaultRoute","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnRoute","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::Route","aws:cdk:cloudformation:props":{"destinationCidrBlock":"0.0.0.0/0","gatewayId":{"Ref":"EcsVpcIGWF80402C4"},"routeTableId":{"Ref":"EcsVpcPublicSubnet2RouteTable259A8B2D"}}}}}},"PrivateSubnet1":{"id":"PrivateSubnet1","path":"demo-dev/EcsVpc/PrivateSubnet1","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.PrivateSubnet","version":"2.235.0","metadata":[]},"children":{"Subnet":{"id":"Subnet","path":"demo-dev/EcsVpc/PrivateSubnet1/Subnet","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnSubnet","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::Subnet","aws:cdk:cloudformation:props":{"availabilityZone":{"Fn::Select":[0,{"Fn::GetAZs":""}]},"cidrBlock":"10.0.128.0/18","mapPublicIpOnLaunch":false,"tags":[{"key":"aws-cdk:subnet-name","value":"Private"},{"key":"aws-cdk:subnet-type","value":"Private"},{"key":"Name","value":"demo-dev/EcsVpc/PrivateSubnet1"}],"vpcId":{"Ref":"EcsVpcCEF3634B"}}}},"Acl":{"id":"Acl","path":"demo-dev/EcsVpc/PrivateSubnet1/Acl","constructInfo":{"fqn":"aws-cdk-lib.Resource","version":"2.235.0","metadata":[]}},"RouteTable":{"id":"RouteTable","path":"demo-dev/EcsVpc/PrivateSubnet1/RouteTable","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnRouteTable","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::RouteTable","aws:cdk:cloudformation:props":{"tags":[{"key":"Name","value":"demo-dev/EcsVpc/PrivateSubnet1"}],"vpcId":{"Ref":"EcsVpcCEF3634B"}}}},"RouteTableAssociation":{"id":"RouteTableAssociation","path":"demo-dev/EcsVpc/PrivateSubnet1/RouteTableAssociation","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::SubnetRouteTableAssociation","aws:cdk:cloudformation:props":{"routeTableId":{"Ref":"EcsVpcPrivateSubnet1RouteTable44D603B2"},"subnetId":{"Ref":"EcsVpcPrivateSubnet1SubnetDE1C6717"}}}},"DefaultRoute":{"id":"DefaultRoute","path":"demo-dev/EcsVpc/PrivateSubnet1/DefaultRoute","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnRoute","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::Route","aws:cdk:cloudformation:props":{"destinationCidrBlock":"0.0.0.0/0","natGatewayId":{"Ref":"EcsVpcPublicSubnet1NATGateway84F4640B"},"routeTableId":{"Ref":"EcsVpcPrivateSubnet1RouteTable44D603B2"}}}}}},"PrivateSubnet2":{"id":"PrivateSubnet2","path":"demo-dev/EcsVpc/PrivateSubnet2","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.PrivateSubnet","version":"2.235.0","metadata":[]},"children":{"Subnet":{"id":"Subnet","path":"demo-dev/EcsVpc/PrivateSubnet2/Subnet","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnSubnet","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::Subnet","aws:cdk:cloudformation:props":{"availabilityZone":{"Fn::Select":[1,{"Fn::GetAZs":""}]},"cidrBlock":"10.0.192.0/18","mapPublicIpOnLaunch":false,"tags":[{"key":"aws-cdk:subnet-name","value":"Private"},{"key":"aws-cdk:subnet-type","value":"Private"},{"key":"Name","value":"demo-dev/EcsVpc/PrivateSubnet2"}],"vpcId":{"Ref":"EcsVpcCEF3634B"}}}},"Acl":{"id":"Acl","path":"demo-dev/EcsVpc/PrivateSubnet2/Acl","constructInfo":{"fqn":"aws-cdk-lib.Resource","version":"2.235.0","metadata":[]}},"RouteTable":{"id":"RouteTable","path":"demo-dev/EcsVpc/PrivateSubnet2/RouteTable","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnRouteTable","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::RouteTable","aws:cdk:cloudformation:props":{"tags":[{"key":"Name","value":"demo-dev/EcsVpc/PrivateSubnet2"}],"vpcId":{"Ref":"EcsVpcCEF3634B"}}}},"RouteTableAssociation":{"id":"RouteTableAssociation","path":"demo-dev/EcsVpc/PrivateSubnet2/RouteTableAssociation","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::SubnetRouteTableAssociation","aws:cdk:cloudformation:props":{"routeTableId":{"Ref":"EcsVpcPrivateSubnet2RouteTable1CB3B77F"},"subnetId":{"Ref":"EcsVpcPrivateSubnet2Subnet4E5EDAB1"}}}},"DefaultRoute":{"id":"DefaultRoute","path":"demo-dev/EcsVpc/PrivateSubnet2/DefaultRoute","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnRoute","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::Route","aws:cdk:cloudformation:props":{"destinationCidrBlock":"0.0.0.0/0","natGatewayId":{"Ref":"EcsVpcPublicSubnet1NATGateway84F4640B"},"routeTableId":{"Ref":"EcsVpcPrivateSubnet2RouteTable1CB3B77F"}}}}}},"IGW":{"id":"IGW","path":"demo-dev/EcsVpc/IGW","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnInternetGateway","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::InternetGateway","aws:cdk:cloudformation:props":{"tags":[{"key":"Name","value":"demo-dev/EcsVpc"}]}}},"VPCGW":{"id":"VPCGW","path":"demo-dev/EcsVpc/VPCGW","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::VPCGatewayAttachment","aws:cdk:cloudformation:props":{"internetGatewayId":{"Ref":"EcsVpcIGWF80402C4"},"vpcId":{"Ref":"EcsVpcCEF3634B"}}}}}},"EcsCluster":{"id":"EcsCluster","path":"demo-dev/EcsCluster","constructInfo":{"fqn":"aws-cdk-lib.aws_ecs.Cluster","version":"2.235.0","metadata":[]},"children":{"Resource":{"id":"Resource","path":"demo-dev/EcsCluster/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_ecs.CfnCluster","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ECS::Cluster","aws:cdk:cloudformation:props":{"clusterSettings":[{"name":"containerInsights","value":"enhanced"}]}}}}},"HelloWorldService":{"id":"HelloWorldService","path":"demo-dev/HelloWorldService","constructInfo":{"fqn":"aws-cdk-lib.aws_ecs_patterns.ApplicationLoadBalancedFargateService","version":"2.235.0"},"children":{"LB":{"id":"LB","path":"demo-dev/HelloWorldService/LB","constructInfo":{"fqn":"aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer","version":"2.235.0","metadata":[]},"children":{"Resource":{"id":"Resource","path":"demo-dev/HelloWorldService/LB/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_elasticloadbalancingv2.CfnLoadBalancer","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ElasticLoadBalancingV2::LoadBalancer","aws:cdk:cloudformation:props":{"loadBalancerAttributes":[{"key":"deletion_protection.enabled","value":"false"}],"scheme":"internet-facing","securityGroups":[{"Fn::GetAtt":["HelloWorldServiceLBSecurityGroup05C4B30B","GroupId"]}],"subnets":[{"Ref":"EcsVpcPublicSubnet1Subnet4FC26CFD"},{"Ref":"EcsVpcPublicSubnet2Subnet127B1F4A"}],"type":"application"}}},"SecurityGroup":{"id":"SecurityGroup","path":"demo-dev/HelloWorldService/LB/SecurityGroup","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.SecurityGroup","version":"2.235.0","metadata":[]},"children":{"Resource":{"id":"Resource","path":"demo-dev/HelloWorldService/LB/SecurityGroup/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnSecurityGroup","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::SecurityGroup","aws:cdk:cloudformation:props":{"groupDescription":"Automatically created Security Group for ELB demodevHelloWorldServiceLB336CD0FA","securityGroupIngress":[{"cidrIp":"0.0.0.0/0","ipProtocol":"tcp","fromPort":80,"toPort":80,"description":"Allow from anyone on port 80"}],"vpcId":{"Ref":"EcsVpcCEF3634B"}}}},"to demodevHelloWorldServiceSecurityGroupBD71156A:80":{"id":"to demodevHelloWorldServiceSecurityGroupBD71156A:80","path":"demo-dev/HelloWorldService/LB/SecurityGroup/to demodevHelloWorldServiceSecurityGroupBD71156A:80","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnSecurityGroupEgress","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::SecurityGroupEgress","aws:cdk:cloudformation:props":{"description":"Load balancer to target","destinationSecurityGroupId":{"Fn::GetAtt":["HelloWorldServiceSecurityGroup5F3BD4A7","GroupId"]},"fromPort":80,"groupId":{"Fn::GetAtt":["HelloWorldServiceLBSecurityGroup05C4B30B","GroupId"]},"ipProtocol":"tcp","toPort":80}}}}},"PublicListener":{"id":"PublicListener","path":"demo-dev/HelloWorldService/LB/PublicListener","constructInfo":{"fqn":"aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationListener","version":"2.235.0","metadata":[]},"children":{"Resource":{"id":"Resource","path":"demo-dev/HelloWorldService/LB/PublicListener/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_elasticloadbalancingv2.CfnListener","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ElasticLoadBalancingV2::Listener","aws:cdk:cloudformation:props":{"defaultActions":[{"type":"forward","targetGroupArn":{"Ref":"HelloWorldServiceLBPublicListenerECSGroup63BD356F"}}],"loadBalancerArn":{"Ref":"HelloWorldServiceLB7C80B268"},"port":80,"protocol":"HTTP"}}},"ECSGroup":{"id":"ECSGroup","path":"demo-dev/HelloWorldService/LB/PublicListener/ECSGroup","constructInfo":{"fqn":"aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationTargetGroup","version":"2.235.0"},"children":{"Resource":{"id":"Resource","path":"demo-dev/HelloWorldService/LB/PublicListener/ECSGroup/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_elasticloadbalancingv2.CfnTargetGroup","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ElasticLoadBalancingV2::TargetGroup","aws:cdk:cloudformation:props":{"healthCheckIntervalSeconds":30,"healthCheckPath":"/","port":80,"protocol":"HTTP","targetGroupAttributes":[{"key":"stickiness.enabled","value":"false"}],"targetType":"ip","vpcId":{"Ref":"EcsVpcCEF3634B"}}}}}}}}}},"LoadBalancerDNS":{"id":"LoadBalancerDNS","path":"demo-dev/HelloWorldService/LoadBalancerDNS","constructInfo":{"fqn":"aws-cdk-lib.CfnOutput","version":"2.235.0"}},"ServiceURL":{"id":"ServiceURL","path":"demo-dev/HelloWorldService/ServiceURL","constructInfo":{"fqn":"aws-cdk-lib.CfnOutput","version":"2.235.0"}},"TaskDef":{"id":"TaskDef","path":"demo-dev/HelloWorldService/TaskDef","constructInfo":{"fqn":"aws-cdk-lib.aws_ecs.FargateTaskDefinition","version":"2.235.0","metadata":[]},"children":{"TaskRole":{"id":"TaskRole","path":"demo-dev/HelloWorldService/TaskDef/TaskRole","constructInfo":{"fqn":"aws-cdk-lib.aws_iam.Role","version":"2.235.0","metadata":[]},"children":{"ImportTaskRole":{"id":"ImportTaskRole","path":"demo-dev/HelloWorldService/TaskDef/TaskRole/ImportTaskRole","constructInfo":{"fqn":"aws-cdk-lib.Resource","version":"2.235.0","metadata":[]}},"Resource":{"id":"Resource","path":"demo-dev/HelloWorldService/TaskDef/TaskRole/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_iam.CfnRole","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::IAM::Role","aws:cdk:cloudformation:props":{"assumeRolePolicyDocument":{"Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Principal":{"Service":"ecs-tasks.amazonaws.com"}}],"Version":"2012-10-17"}}}}}},"Resource":{"id":"Resource","path":"demo-dev/HelloWorldService/TaskDef/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_ecs.CfnTaskDefinition","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ECS::TaskDefinition","aws:cdk:cloudformation:props":{"containerDefinitions":[{"essential":true,"image":"amazon/amazon-ecs-sample","name":"web","portMappings":[{"containerPort":80,"protocol":"tcp"}],"logConfiguration":{"logDriver":"awslogs","options":{"awslogs-group":{"Ref":"HelloWorldServiceTaskDefwebLogGroup85B2B7D4"},"awslogs-stream-prefix":"HelloWorldService","awslogs-region":"us-east-1"}}}],"cpu":"256","executionRoleArn":{"Fn::GetAtt":["HelloWorldServiceTaskDefExecutionRole19BA93E1","Arn"]},"family":"demodevHelloWorldServiceTaskDef33CD2655","memory":"512","networkMode":"awsvpc","requiresCompatibilities":["FARGATE"],"taskRoleArn":{"Fn::GetAtt":["HelloWorldServiceTaskDefTaskRole0AF7155B","Arn"]}}}},"web":{"id":"web","path":"demo-dev/HelloWorldService/TaskDef/web","constructInfo":{"fqn":"aws-cdk-lib.aws_ecs.ContainerDefinition","version":"2.235.0"},"children":{"LogGroup":{"id":"LogGroup","path":"demo-dev/HelloWorldService/TaskDef/web/LogGroup","constructInfo":{"fqn":"aws-cdk-lib.aws_logs.LogGroup","version":"2.235.0","metadata":[]},"children":{"Resource":{"id":"Resource","path":"demo-dev/HelloWorldService/TaskDef/web/LogGroup/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_logs.CfnLogGroup","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::Logs::LogGroup","aws:cdk:cloudformation:props":{}}}}}}},"ExecutionRole":{"id":"ExecutionRole","path":"demo-dev/HelloWorldService/TaskDef/ExecutionRole","constructInfo":{"fqn":"aws-cdk-lib.aws_iam.Role","version":"2.235.0","metadata":[]},"children":{"ImportExecutionRole":{"id":"ImportExecutionRole","path":"demo-dev/HelloWorldService/TaskDef/ExecutionRole/ImportExecutionRole","constructInfo":{"fqn":"aws-cdk-lib.Resource","version":"2.235.0","metadata":[]}},"Resource":{"id":"Resource","path":"demo-dev/HelloWorldService/TaskDef/ExecutionRole/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_iam.CfnRole","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::IAM::Role","aws:cdk:cloudformation:props":{"assumeRolePolicyDocument":{"Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Principal":{"Service":"ecs-tasks.amazonaws.com"}}],"Version":"2012-10-17"}}}},"DefaultPolicy":{"id":"DefaultPolicy","path":"demo-dev/HelloWorldService/TaskDef/ExecutionRole/DefaultPolicy","constructInfo":{"fqn":"aws-cdk-lib.aws_iam.Policy","version":"2.235.0","metadata":[]},"children":{"Resource":{"id":"Resource","path":"demo-dev/HelloWorldService/TaskDef/ExecutionRole/DefaultPolicy/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_iam.CfnPolicy","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::IAM::Policy","aws:cdk:cloudformation:props":{"policyDocument":{"Statement":[{"Action":["logs:CreateLogStream","logs:PutLogEvents"],"Effect":"Allow","Resource":{"Fn::GetAtt":["HelloWorldServiceTaskDefwebLogGroup85B2B7D4","Arn"]}}],"Version":"2012-10-17"},"policyName":"HelloWorldServiceTaskDefExecutionRoleDefaultPolicyDAAEB0BF","roles":[{"Ref":"HelloWorldServiceTaskDefExecutionRole19BA93E1"}]}}}}}}}}},"Service":{"id":"Service","path":"demo-dev/HelloWorldService/Service","constructInfo":{"fqn":"aws-cdk-lib.aws_ecs.FargateService","version":"2.235.0","metadata":[]},"children":{"Service":{"id":"Service","path":"demo-dev/HelloWorldService/Service/Service","constructInfo":{"fqn":"aws-cdk-lib.aws_ecs.CfnService","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ECS::Service","aws:cdk:cloudformation:props":{"cluster":{"Ref":"EcsCluster97242B84"},"deploymentConfiguration":{"maximumPercent":200,"minimumHealthyPercent":50,"alarms":{"alarmNames":[],"enable":false,"rollback":false}},"desiredCount":2,"enableEcsManagedTags":false,"healthCheckGracePeriodSeconds":60,"launchType":"FARGATE","loadBalancers":[{"targetGroupArn":{"Ref":"HelloWorldServiceLBPublicListenerECSGroup63BD356F"},"containerName":"web","containerPort":80}],"networkConfiguration":{"awsvpcConfiguration":{"assignPublicIp":"DISABLED","subnets":[{"Ref":"EcsVpcPrivateSubnet1SubnetDE1C6717"},{"Ref":"EcsVpcPrivateSubnet2Subnet4E5EDAB1"}],"securityGroups":[{"Fn::GetAtt":["HelloWorldServiceSecurityGroup5F3BD4A7","GroupId"]}]}},"taskDefinition":{"Ref":"HelloWorldServiceTaskDef17C5487C"}}}},"SecurityGroup":{"id":"SecurityGroup","path":"demo-dev/HelloWorldService/Service/SecurityGroup","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.SecurityGroup","version":"2.235.0","metadata":[]},"children":{"Resource":{"id":"Resource","path":"demo-dev/HelloWorldService/Service/SecurityGroup/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnSecurityGroup","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::SecurityGroup","aws:cdk:cloudformation:props":{"groupDescription":"demo-dev/HelloWorldService/Service/SecurityGroup","securityGroupEgress":[{"cidrIp":"0.0.0.0/0","description":"Allow all outbound traffic by default","ipProtocol":"-1"}],"vpcId":{"Ref":"EcsVpcCEF3634B"}}}},"from demodevHelloWorldServiceLBSecurityGroup1B22B0D3:80":{"id":"from demodevHelloWorldServiceLBSecurityGroup1B22B0D3:80","path":"demo-dev/HelloWorldService/Service/SecurityGroup/from demodevHelloWorldServiceLBSecurityGroup1B22B0D3:80","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnSecurityGroupIngress","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::SecurityGroupIngress","aws:cdk:cloudformation:props":{"description":"Load balancer to target","fromPort":80,"groupId":{"Fn::GetAtt":["HelloWorldServiceSecurityGroup5F3BD4A7","GroupId"]},"ipProtocol":"tcp","sourceSecurityGroupId":{"Fn::GetAtt":["HelloWorldServiceLBSecurityGroup05C4B30B","GroupId"]},"toPort":80}}}}}}}}},"SloganApi":{"id":"SloganApi","path":"demo-dev/SloganApi","constructInfo":{"fqn":"constructs.Construct","version":"10.4.5"},"children":{"SloganTable":{"id":"SloganTable","path":"demo-dev/SloganApi/SloganTable","constructInfo":{"fqn":"aws-cdk-lib.aws_dynamodb.Table","version":"2.235.0","metadata":[]},"children":{"Resource":{"id":"Resource","path":"demo-dev/SloganApi/SloganTable/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_dynamodb.CfnTable","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::DynamoDB::Table","aws:cdk:cloudformation:props":{"attributeDefinitions":[{"attributeName":"id","attributeType":"S"}],"billingMode":"PAY_PER_REQUEST","keySchema":[{"attributeName":"id","keyType":"HASH"}]}}},"ScalingRole":{"id":"ScalingRole","path":"demo-dev/SloganApi/SloganTable/ScalingRole","constructInfo":{"fqn":"aws-cdk-lib.Resource","version":"2.235.0","metadata":[]}}}},"SloganHandler":{"id":"SloganHandler","path":"demo-dev/SloganApi/SloganHandler","constructInfo":{"fqn":"aws-cdk-lib.aws_lambda.Function","version":"2.235.0","metadata":[]},"children":{"ServiceRole":{"id":"ServiceRole","path":"demo-dev/SloganApi/SloganHandler/ServiceRole","constructInfo":{"fqn":"aws-cdk-lib.aws_iam.Role","version":"2.235.0","metadata":[]},"children":{"ImportServiceRole":{"id":"ImportServiceRole","path":"demo-dev/SloganApi/SloganHandler/ServiceRole/ImportServiceRole","constructInfo":{"fqn":"aws-cdk-lib.Resource","version":"2.235.0","metadata":[]}},"Resource":{"id":"Resource","path":"demo-dev/SloganApi/SloganHandler/ServiceRole/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_iam.CfnRole","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::IAM::Role","aws:cdk:cloudformation:props":{"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"]]}]}}},"DefaultPolicy":{"id":"DefaultPolicy","path":"demo-dev/SloganApi/SloganHandler/ServiceRole/DefaultPolicy","constructInfo":{"fqn":"aws-cdk-lib.aws_iam.Policy","version":"2.235.0","metadata":[]},"children":{"Resource":{"id":"Resource","path":"demo-dev/SloganApi/SloganHandler/ServiceRole/DefaultPolicy/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_iam.CfnPolicy","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::IAM::Policy","aws:cdk:cloudformation:props":{"policyDocument":{"Statement":[{"Action":["dynamodb:BatchGetItem","dynamodb:Query","dynamodb:GetItem","dynamodb:Scan","dynamodb:ConditionCheckItem","dynamodb:DescribeTable"],"Effect":"Allow","Resource":{"Fn::GetAtt":["SloganApiSloganTableCB6C1B43","Arn"]}},{"Action":["dynamodb:GetRecords","dynamodb:GetShardIterator"],"Effect":"Allow","Resource":{"Fn::GetAtt":["SloganApiSloganTableCB6C1B43","Arn"]}}],"Version":"2012-10-17"},"policyName":"SloganApiSloganHandlerServiceRoleDefaultPolicy6CF9FA7B","roles":[{"Ref":"SloganApiSloganHandlerServiceRoleECEA30F0"}]}}}}}}},"Resource":{"id":"Resource","path":"demo-dev/SloganApi/SloganHandler/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_lambda.CfnFunction","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::Lambda::Function","aws:cdk:cloudformation:props":{"code":{"zipFile":"\nconst { DynamoDBClient, ScanCommand } = require('@aws-sdk/client-dynamodb');\nconst { unmarshall } = require('@aws-sdk/util-dynamodb');\n\nconst client = new DynamoDBClient({});\n\nexports.handler = async (event) => {\n try {\n const command = new ScanCommand({\n TableName: process.env.TABLE_NAME,\n });\n \n const response = await client.send(command);\n \n if (!response.Items || response.Items.length === 0) {\n return {\n statusCode: 404,\n headers: {\n 'Content-Type': 'application/json',\n 'Access-Control-Allow-Origin': '*',\n },\n body: JSON.stringify({ message: 'No slogans found' }),\n };\n }\n \n const items = response.Items.map(item => unmarshall(item));\n const randomSlogan = items[Math.floor(Math.random() * items.length)];\n \n return {\n statusCode: 200,\n headers: {\n 'Content-Type': 'application/json',\n 'Access-Control-Allow-Origin': '*',\n },\n body: JSON.stringify(randomSlogan),\n };\n } catch (error) {\n console.error('Error:', error);\n return {\n statusCode: 500,\n headers: {\n 'Content-Type': 'application/json',\n 'Access-Control-Allow-Origin': '*',\n },\n body: JSON.stringify({ message: 'Internal server error' }),\n };\n }\n};\n "},"environment":{"variables":{"TABLE_NAME":{"Ref":"SloganApiSloganTableCB6C1B43"}}},"handler":"index.handler","role":{"Fn::GetAtt":["SloganApiSloganHandlerServiceRoleECEA30F0","Arn"]},"runtime":"nodejs20.x"}}}}},"SloganApi":{"id":"SloganApi","path":"demo-dev/SloganApi/SloganApi","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.RestApi","version":"2.235.0","metadata":[]},"children":{"Resource":{"id":"Resource","path":"demo-dev/SloganApi/SloganApi/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnRestApi","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::RestApi","aws:cdk:cloudformation:props":{"description":"API for retrieving random slogans","name":"Slogan Service"}}},"CloudWatchRole":{"id":"CloudWatchRole","path":"demo-dev/SloganApi/SloganApi/CloudWatchRole","constructInfo":{"fqn":"aws-cdk-lib.aws_iam.Role","version":"2.235.0","metadata":[]},"children":{"ImportCloudWatchRole":{"id":"ImportCloudWatchRole","path":"demo-dev/SloganApi/SloganApi/CloudWatchRole/ImportCloudWatchRole","constructInfo":{"fqn":"aws-cdk-lib.Resource","version":"2.235.0","metadata":[]}},"Resource":{"id":"Resource","path":"demo-dev/SloganApi/SloganApi/CloudWatchRole/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_iam.CfnRole","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::IAM::Role","aws:cdk:cloudformation:props":{"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"]]}]}}}}},"Account":{"id":"Account","path":"demo-dev/SloganApi/SloganApi/Account","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnAccount","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Account","aws:cdk:cloudformation:props":{"cloudWatchRoleArn":{"Fn::GetAtt":["SloganApiCloudWatchRoleEE348950","Arn"]}}}},"Deployment":{"id":"Deployment","path":"demo-dev/SloganApi/SloganApi/Deployment","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Deployment","version":"2.235.0","metadata":[]},"children":{"Resource":{"id":"Resource","path":"demo-dev/SloganApi/SloganApi/Deployment/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnDeployment","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Deployment","aws:cdk:cloudformation:props":{"description":"API for retrieving random slogans","restApiId":{"Ref":"SloganApiCE741B91"}}}}}},"DeploymentStage.prod":{"id":"DeploymentStage.prod","path":"demo-dev/SloganApi/SloganApi/DeploymentStage.prod","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Stage","version":"2.235.0","metadata":[]},"children":{"Resource":{"id":"Resource","path":"demo-dev/SloganApi/SloganApi/DeploymentStage.prod/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnStage","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Stage","aws:cdk:cloudformation:props":{"deploymentId":{"Ref":"SloganApiDeploymentEE6F43ECc6df96eeb874377443dc4186ac23be0f"},"restApiId":{"Ref":"SloganApiCE741B91"},"stageName":"prod"}}}}},"Endpoint":{"id":"Endpoint","path":"demo-dev/SloganApi/SloganApi/Endpoint","constructInfo":{"fqn":"aws-cdk-lib.CfnOutput","version":"2.235.0"}},"Default":{"id":"Default","path":"demo-dev/SloganApi/SloganApi/Default","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.ResourceBase","version":"2.235.0","metadata":[]},"children":{"OPTIONS":{"id":"OPTIONS","path":"demo-dev/SloganApi/SloganApi/Default/OPTIONS","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Method","version":"2.235.0","metadata":[]},"children":{"Resource":{"id":"Resource","path":"demo-dev/SloganApi/SloganApi/Default/OPTIONS/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnMethod","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Method","aws:cdk:cloudformation:props":{"apiKeyRequired":false,"authorizationType":"NONE","httpMethod":"OPTIONS","integration":{"type":"MOCK","requestTemplates":{"application/json":"{ statusCode: 200 }"},"integrationResponses":[{"statusCode":"204","responseParameters":{"method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'","method.response.header.Access-Control-Allow-Origin":"'*'","method.response.header.Access-Control-Allow-Methods":"'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'"}}]},"methodResponses":[{"statusCode":"204","responseParameters":{"method.response.header.Access-Control-Allow-Headers":true,"method.response.header.Access-Control-Allow-Origin":true,"method.response.header.Access-Control-Allow-Methods":true}}],"resourceId":{"Fn::GetAtt":["SloganApiCE741B91","RootResourceId"]},"restApiId":{"Ref":"SloganApiCE741B91"}}}}}},"slogans":{"id":"slogans","path":"demo-dev/SloganApi/SloganApi/Default/slogans","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Resource","version":"2.235.0","metadata":[]},"children":{"Resource":{"id":"Resource","path":"demo-dev/SloganApi/SloganApi/Default/slogans/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnResource","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Resource","aws:cdk:cloudformation:props":{"parentId":{"Fn::GetAtt":["SloganApiCE741B91","RootResourceId"]},"pathPart":"slogans","restApiId":{"Ref":"SloganApiCE741B91"}}}},"OPTIONS":{"id":"OPTIONS","path":"demo-dev/SloganApi/SloganApi/Default/slogans/OPTIONS","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Method","version":"2.235.0","metadata":[]},"children":{"Resource":{"id":"Resource","path":"demo-dev/SloganApi/SloganApi/Default/slogans/OPTIONS/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnMethod","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Method","aws:cdk:cloudformation:props":{"apiKeyRequired":false,"authorizationType":"NONE","httpMethod":"OPTIONS","integration":{"type":"MOCK","requestTemplates":{"application/json":"{ statusCode: 200 }"},"integrationResponses":[{"statusCode":"204","responseParameters":{"method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'","method.response.header.Access-Control-Allow-Origin":"'*'","method.response.header.Access-Control-Allow-Methods":"'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'"}}]},"methodResponses":[{"statusCode":"204","responseParameters":{"method.response.header.Access-Control-Allow-Headers":true,"method.response.header.Access-Control-Allow-Origin":true,"method.response.header.Access-Control-Allow-Methods":true}}],"resourceId":{"Ref":"SloganApislogans775A04F4"},"restApiId":{"Ref":"SloganApiCE741B91"}}}}}},"random":{"id":"random","path":"demo-dev/SloganApi/SloganApi/Default/slogans/random","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Resource","version":"2.235.0","metadata":[]},"children":{"Resource":{"id":"Resource","path":"demo-dev/SloganApi/SloganApi/Default/slogans/random/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnResource","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Resource","aws:cdk:cloudformation:props":{"parentId":{"Ref":"SloganApislogans775A04F4"},"pathPart":"random","restApiId":{"Ref":"SloganApiCE741B91"}}}},"OPTIONS":{"id":"OPTIONS","path":"demo-dev/SloganApi/SloganApi/Default/slogans/random/OPTIONS","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Method","version":"2.235.0","metadata":[]},"children":{"Resource":{"id":"Resource","path":"demo-dev/SloganApi/SloganApi/Default/slogans/random/OPTIONS/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnMethod","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Method","aws:cdk:cloudformation:props":{"apiKeyRequired":false,"authorizationType":"NONE","httpMethod":"OPTIONS","integration":{"type":"MOCK","requestTemplates":{"application/json":"{ statusCode: 200 }"},"integrationResponses":[{"statusCode":"204","responseParameters":{"method.response.header.Access-Control-Allow-Headers":"'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-Amz-User-Agent'","method.response.header.Access-Control-Allow-Origin":"'*'","method.response.header.Access-Control-Allow-Methods":"'OPTIONS,GET,PUT,POST,DELETE,PATCH,HEAD'"}}]},"methodResponses":[{"statusCode":"204","responseParameters":{"method.response.header.Access-Control-Allow-Headers":true,"method.response.header.Access-Control-Allow-Origin":true,"method.response.header.Access-Control-Allow-Methods":true}}],"resourceId":{"Ref":"SloganApislogansrandomD8CAA1EC"},"restApiId":{"Ref":"SloganApiCE741B91"}}}}}},"GET":{"id":"GET","path":"demo-dev/SloganApi/SloganApi/Default/slogans/random/GET","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Method","version":"2.235.0","metadata":[]},"children":{"ApiPermission.demodevSloganApi4213025D.GET..slogans.random":{"id":"ApiPermission.demodevSloganApi4213025D.GET..slogans.random","path":"demo-dev/SloganApi/SloganApi/Default/slogans/random/GET/ApiPermission.demodevSloganApi4213025D.GET..slogans.random","constructInfo":{"fqn":"aws-cdk-lib.aws_lambda.CfnPermission","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::Lambda::Permission","aws:cdk:cloudformation:props":{"action":"lambda:InvokeFunction","functionName":{"Fn::GetAtt":["SloganApiSloganHandler60D7C325","Arn"]},"principal":"apigateway.amazonaws.com","sourceArn":{"Fn::Join":["",["arn:",{"Ref":"AWS::Partition"},":execute-api:us-east-1:",{"Ref":"AWS::AccountId"},":",{"Ref":"SloganApiCE741B91"},"/",{"Ref":"SloganApiDeploymentStageprod489F153F"},"/GET/slogans/random"]]}}}},"ApiPermission.Test.demodevSloganApi4213025D.GET..slogans.random":{"id":"ApiPermission.Test.demodevSloganApi4213025D.GET..slogans.random","path":"demo-dev/SloganApi/SloganApi/Default/slogans/random/GET/ApiPermission.Test.demodevSloganApi4213025D.GET..slogans.random","constructInfo":{"fqn":"aws-cdk-lib.aws_lambda.CfnPermission","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::Lambda::Permission","aws:cdk:cloudformation:props":{"action":"lambda:InvokeFunction","functionName":{"Fn::GetAtt":["SloganApiSloganHandler60D7C325","Arn"]},"principal":"apigateway.amazonaws.com","sourceArn":{"Fn::Join":["",["arn:",{"Ref":"AWS::Partition"},":execute-api:us-east-1:",{"Ref":"AWS::AccountId"},":",{"Ref":"SloganApiCE741B91"},"/test-invoke-stage/GET/slogans/random"]]}}}},"Resource":{"id":"Resource","path":"demo-dev/SloganApi/SloganApi/Default/slogans/random/GET/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnMethod","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Method","aws:cdk:cloudformation:props":{"authorizationType":"NONE","httpMethod":"GET","integration":{"type":"AWS_PROXY","uri":{"Fn::Join":["",["arn:",{"Ref":"AWS::Partition"},":apigateway:us-east-1:lambda:path/2015-03-31/functions/",{"Fn::GetAtt":["SloganApiSloganHandler60D7C325","Arn"]},"/invocations"]]},"integrationHttpMethod":"POST"},"resourceId":{"Ref":"SloganApislogansrandomD8CAA1EC"},"restApiId":{"Ref":"SloganApiCE741B91"}}}}}}}}}}}}}}}},"BastionHosts":{"id":"BastionHosts","path":"demo-dev/BastionHosts","constructInfo":{"fqn":"constructs.Construct","version":"10.4.5"},"children":{"BastionSecurityGroup":{"id":"BastionSecurityGroup","path":"demo-dev/BastionHosts/BastionSecurityGroup","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.SecurityGroup","version":"2.235.0","metadata":[]},"children":{"Resource":{"id":"Resource","path":"demo-dev/BastionHosts/BastionSecurityGroup/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnSecurityGroup","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::SecurityGroup","aws:cdk:cloudformation:props":{"groupDescription":"Security group for bastion hosts","securityGroupEgress":[{"cidrIp":"0.0.0.0/0","description":"Allow all outbound traffic by default","ipProtocol":"-1"}],"securityGroupIngress":[{"cidrIp":"0.0.0.0/0","ipProtocol":"tcp","fromPort":22,"toPort":22,"description":"Allow SSH access to bastion hosts"}],"vpcId":{"Ref":"EcsVpcCEF3634B"}}}}}},"BastionRole":{"id":"BastionRole","path":"demo-dev/BastionHosts/BastionRole","constructInfo":{"fqn":"aws-cdk-lib.aws_iam.Role","version":"2.235.0","metadata":[]},"children":{"ImportBastionRole":{"id":"ImportBastionRole","path":"demo-dev/BastionHosts/BastionRole/ImportBastionRole","constructInfo":{"fqn":"aws-cdk-lib.Resource","version":"2.235.0","metadata":[]}},"Resource":{"id":"Resource","path":"demo-dev/BastionHosts/BastionRole/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_iam.CfnRole","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::IAM::Role","aws:cdk:cloudformation:props":{"assumeRolePolicyDocument":{"Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Principal":{"Service":"ec2.amazonaws.com"}}],"Version":"2012-10-17"},"description":"IAM role for bastion hosts","managedPolicyArns":[{"Fn::Join":["",["arn:",{"Ref":"AWS::Partition"},":iam::aws:policy/AmazonSSMManagedInstanceCore"]]}]}}}}},"BastionASG":{"id":"BastionASG","path":"demo-dev/BastionHosts/BastionASG","constructInfo":{"fqn":"aws-cdk-lib.aws_autoscaling.AutoScalingGroup","version":"2.235.0","metadata":[]},"children":{"InstanceProfile":{"id":"InstanceProfile","path":"demo-dev/BastionHosts/BastionASG/InstanceProfile","constructInfo":{"fqn":"aws-cdk-lib.aws_iam.CfnInstanceProfile","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::IAM::InstanceProfile","aws:cdk:cloudformation:props":{"roles":[{"Ref":"BastionHostsBastionRole17A80369"}]}}},"LaunchConfig":{"id":"LaunchConfig","path":"demo-dev/BastionHosts/BastionASG/LaunchConfig","constructInfo":{"fqn":"aws-cdk-lib.aws_autoscaling.CfnLaunchConfiguration","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::AutoScaling::LaunchConfiguration","aws:cdk:cloudformation:props":{"iamInstanceProfile":{"Ref":"BastionHostsBastionASGInstanceProfile57F1D73F"},"imageId":{"Ref":"SsmParameterValueawsserviceamiamazonlinuxlatestal2023amikernel61x8664C96584B6F00A464EAD1953AFF4B05118Parameter"},"instanceType":"t3.micro","securityGroups":[{"Fn::GetAtt":["BastionHostsBastionSecurityGroupDD8BDECD","GroupId"]}],"userData":{"Fn::Base64":"#!/bin/bash\n#!/bin/bash\nyum update -y\nyum install -y amazon-ssm-agent\nsystemctl enable amazon-ssm-agent\nsystemctl start amazon-ssm-agent\n\n# Install useful tools\nyum install -y htop tmux vim\n\n# Configure SSH banner\necho \"================================================\" > /etc/ssh/banner\necho \" Bastion Host - Authorized Access Only\" >> /etc/ssh/banner\necho \" All activities are logged and monitored\" >> /etc/ssh/banner\necho \"================================================\" >> /etc/ssh/banner\necho \"Banner /etc/ssh/banner\" >> /etc/ssh/sshd_config\nsystemctl restart sshd"}}}},"ASG":{"id":"ASG","path":"demo-dev/BastionHosts/BastionASG/ASG","constructInfo":{"fqn":"aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup","version":"2.235.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::AutoScaling::AutoScalingGroup","aws:cdk:cloudformation:props":{"desiredCapacity":"2","healthCheckGracePeriod":300,"healthCheckType":"EC2","launchConfigurationName":{"Ref":"BastionHostsBastionASGLaunchConfig16D84AEC"},"maxSize":"2","minSize":"2","tags":[{"key":"Name","value":"demo-dev/BastionHosts/BastionASG","propagateAtLaunch":true}],"vpcZoneIdentifier":[{"Ref":"EcsVpcPublicSubnet1Subnet4FC26CFD"},{"Ref":"EcsVpcPublicSubnet2Subnet127B1F4A"}]}}}}}}},"SsmParameterValue:--aws--service--ami-amazon-linux-latest--al2023-ami-kernel-6.1-x86_64:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter":{"id":"SsmParameterValue:--aws--service--ami-amazon-linux-latest--al2023-ami-kernel-6.1-x86_64:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter","path":"demo-dev/SsmParameterValue:--aws--service--ami-amazon-linux-latest--al2023-ami-kernel-6.1-x86_64:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter","constructInfo":{"fqn":"aws-cdk-lib.CfnParameter","version":"2.235.0"}},"SsmParameterValue:--aws--service--ami-amazon-linux-latest--al2023-ami-kernel-6.1-x86_64:C96584B6-F00A-464E-AD19-53AFF4B05118":{"id":"SsmParameterValue:--aws--service--ami-amazon-linux-latest--al2023-ami-kernel-6.1-x86_64:C96584B6-F00A-464E-AD19-53AFF4B05118","path":"demo-dev/SsmParameterValue:--aws--service--ami-amazon-linux-latest--al2023-ami-kernel-6.1-x86_64:C96584B6-F00A-464E-AD19-53AFF4B05118","constructInfo":{"fqn":"aws-cdk-lib.Resource","version":"2.235.0","metadata":[]}},"SloganApiEndpoint":{"id":"SloganApiEndpoint","path":"demo-dev/SloganApiEndpoint","constructInfo":{"fqn":"aws-cdk-lib.CfnOutput","version":"2.235.0"}},"SloganTableName":{"id":"SloganTableName","path":"demo-dev/SloganTableName","constructInfo":{"fqn":"aws-cdk-lib.CfnOutput","version":"2.235.0"}},"LoadBalancerDNS":{"id":"LoadBalancerDNS","path":"demo-dev/LoadBalancerDNS","constructInfo":{"fqn":"aws-cdk-lib.CfnOutput","version":"2.235.0"}},"BastionSecurityGroupId":{"id":"BastionSecurityGroupId","path":"demo-dev/BastionSecurityGroupId","constructInfo":{"fqn":"aws-cdk-lib.CfnOutput","version":"2.235.0"}},"CDKMetadata":{"id":"CDKMetadata","path":"demo-dev/CDKMetadata","constructInfo":{"fqn":"constructs.Construct","version":"10.4.5"},"children":{"Default":{"id":"Default","path":"demo-dev/CDKMetadata/Default","constructInfo":{"fqn":"aws-cdk-lib.CfnResource","version":"2.235.0"}}}},"BootstrapVersion":{"id":"BootstrapVersion","path":"demo-dev/BootstrapVersion","constructInfo":{"fqn":"aws-cdk-lib.CfnParameter","version":"2.235.0"}},"CheckBootstrapVersion":{"id":"CheckBootstrapVersion","path":"demo-dev/CheckBootstrapVersion","constructInfo":{"fqn":"aws-cdk-lib.CfnRule","version":"2.235.0"}}}},"Tree":{"id":"Tree","path":"Tree","constructInfo":{"fqn":"constructs.Construct","version":"10.4.5"}}}}}
|
package/demo/package.json
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "demo",
|
|
3
|
-
"scripts": {
|
|
4
|
-
"build": "npx projen build",
|
|
5
|
-
"bundle": "npx projen bundle",
|
|
6
|
-
"clobber": "npx projen clobber",
|
|
7
|
-
"compile": "npx projen compile",
|
|
8
|
-
"default": "npx projen default",
|
|
9
|
-
"deploy": "npx projen deploy",
|
|
10
|
-
"destroy": "npx projen destroy",
|
|
11
|
-
"diff": "npx projen diff",
|
|
12
|
-
"eject": "npx projen eject",
|
|
13
|
-
"eslint": "npx projen eslint",
|
|
14
|
-
"package": "npx projen package",
|
|
15
|
-
"post-compile": "npx projen post-compile",
|
|
16
|
-
"post-upgrade": "npx projen post-upgrade",
|
|
17
|
-
"pre-compile": "npx projen pre-compile",
|
|
18
|
-
"synth": "npx projen synth",
|
|
19
|
-
"synth:silent": "npx projen synth:silent",
|
|
20
|
-
"test": "npx projen test",
|
|
21
|
-
"test:watch": "npx projen test:watch",
|
|
22
|
-
"upgrade": "npx projen upgrade",
|
|
23
|
-
"watch": "npx projen watch",
|
|
24
|
-
"projen": "npx projen"
|
|
25
|
-
},
|
|
26
|
-
"devDependencies": {
|
|
27
|
-
"@stylistic/eslint-plugin": "^2",
|
|
28
|
-
"@types/jest": "^30.0.0",
|
|
29
|
-
"@types/node": "^25.0.9",
|
|
30
|
-
"@typescript-eslint/eslint-plugin": "^8",
|
|
31
|
-
"@typescript-eslint/parser": "^8",
|
|
32
|
-
"aws-cdk": "^2",
|
|
33
|
-
"esbuild": "^0.27.2",
|
|
34
|
-
"eslint": "^9",
|
|
35
|
-
"eslint-import-resolver-typescript": "^4.4.4",
|
|
36
|
-
"eslint-plugin-import": "^2.32.0",
|
|
37
|
-
"jest": "^30.2.0",
|
|
38
|
-
"jest-junit": "^16",
|
|
39
|
-
"projen": "^0.99.3",
|
|
40
|
-
"ts-jest": "^29.4.6",
|
|
41
|
-
"ts-node": "^10.9.2",
|
|
42
|
-
"typescript": "^5.9.3"
|
|
43
|
-
},
|
|
44
|
-
"dependencies": {
|
|
45
|
-
"aws-cdk-lib": "^2.1.0",
|
|
46
|
-
"constructs": "^10.0.5"
|
|
47
|
-
},
|
|
48
|
-
"license": "Apache-2.0",
|
|
49
|
-
"publishConfig": {
|
|
50
|
-
"access": "public"
|
|
51
|
-
},
|
|
52
|
-
"version": "0.0.0",
|
|
53
|
-
"jest": {
|
|
54
|
-
"coverageProvider": "v8",
|
|
55
|
-
"testMatch": [
|
|
56
|
-
"<rootDir>/@(src|test)/**/*(*.)@(spec|test).ts?(x)",
|
|
57
|
-
"<rootDir>/@(src|test)/**/__tests__/**/*.ts?(x)",
|
|
58
|
-
"<rootDir>/@(projenrc)/**/*(*.)@(spec|test).ts?(x)",
|
|
59
|
-
"<rootDir>/@(projenrc)/**/__tests__/**/*.ts?(x)"
|
|
60
|
-
],
|
|
61
|
-
"clearMocks": true,
|
|
62
|
-
"collectCoverage": true,
|
|
63
|
-
"coverageReporters": [
|
|
64
|
-
"json",
|
|
65
|
-
"lcov",
|
|
66
|
-
"clover",
|
|
67
|
-
"cobertura",
|
|
68
|
-
"text"
|
|
69
|
-
],
|
|
70
|
-
"coverageDirectory": "coverage",
|
|
71
|
-
"coveragePathIgnorePatterns": [
|
|
72
|
-
"/node_modules/"
|
|
73
|
-
],
|
|
74
|
-
"testPathIgnorePatterns": [
|
|
75
|
-
"/node_modules/"
|
|
76
|
-
],
|
|
77
|
-
"watchPathIgnorePatterns": [
|
|
78
|
-
"/node_modules/"
|
|
79
|
-
],
|
|
80
|
-
"reporters": [
|
|
81
|
-
"default",
|
|
82
|
-
[
|
|
83
|
-
"jest-junit",
|
|
84
|
-
{
|
|
85
|
-
"outputDirectory": "test-reports"
|
|
86
|
-
}
|
|
87
|
-
]
|
|
88
|
-
],
|
|
89
|
-
"transform": {
|
|
90
|
-
"^.+\\.[t]sx?$": [
|
|
91
|
-
"ts-jest",
|
|
92
|
-
{
|
|
93
|
-
"tsconfig": "tsconfig.dev.json"
|
|
94
|
-
}
|
|
95
|
-
]
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
"//": "~~ Generated by projen. To modify, edit .projenrc.ts and run \"npx projen\"."
|
|
99
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Script to seed the DynamoDB table with sample slogans
|
|
5
|
-
* Usage: node scripts/seed-slogans.js <table-name>
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
const { DynamoDBClient } = require('@aws-sdk/client-dynamodb');
|
|
9
|
-
const { DynamoDBDocumentClient, PutCommand } = require('@aws-sdk/lib-dynamodb');
|
|
10
|
-
|
|
11
|
-
const slogans = [
|
|
12
|
-
{ id: '1', text: 'Just Do It', brand: 'Nike' },
|
|
13
|
-
{ id: '2', text: "I'm Lovin' It", brand: 'McDonald\'s' },
|
|
14
|
-
{ id: '3', text: 'Think Different', brand: 'Apple' },
|
|
15
|
-
{ id: '4', text: 'Because You\'re Worth It', brand: 'L\'Oréal' },
|
|
16
|
-
{ id: '5', text: 'The Ultimate Driving Machine', brand: 'BMW' },
|
|
17
|
-
{ id: '6', text: 'Finger Lickin\' Good', brand: 'KFC' },
|
|
18
|
-
{ id: '7', text: 'Have a Break, Have a KitKat', brand: 'KitKat' },
|
|
19
|
-
{ id: '8', text: 'The Happiest Place on Earth', brand: 'Disneyland' },
|
|
20
|
-
{ id: '9', text: 'Melts in Your Mouth, Not in Your Hands', brand: 'M&M\'s' },
|
|
21
|
-
{ id: '10', text: 'Red Bull Gives You Wings', brand: 'Red Bull' },
|
|
22
|
-
];
|
|
23
|
-
|
|
24
|
-
async function seedTable(tableName) {
|
|
25
|
-
const client = new DynamoDBClient({});
|
|
26
|
-
const docClient = DynamoDBDocumentClient.from(client);
|
|
27
|
-
|
|
28
|
-
console.log(`Seeding table: ${tableName}`);
|
|
29
|
-
|
|
30
|
-
for (const slogan of slogans) {
|
|
31
|
-
try {
|
|
32
|
-
await docClient.send(new PutCommand({
|
|
33
|
-
TableName: tableName,
|
|
34
|
-
Item: slogan,
|
|
35
|
-
}));
|
|
36
|
-
console.log(`✓ Added: ${slogan.text}`);
|
|
37
|
-
} catch (error) {
|
|
38
|
-
console.error(`✗ Failed to add ${slogan.text}:`, error.message);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
console.log('\nSeeding complete!');
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const tableName = process.argv[2];
|
|
46
|
-
|
|
47
|
-
if (!tableName) {
|
|
48
|
-
console.error('Usage: node scripts/seed-slogans.js <table-name>');
|
|
49
|
-
process.exit(1);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
seedTable(tableName).catch(error => {
|
|
53
|
-
console.error('Error:', error);
|
|
54
|
-
process.exit(1);
|
|
55
|
-
});
|