When deploying from template,
This service is stack as CREATE_IN_PROGRESS
ServiceD69D759B arn:aws:ecs:ap-northeast-1:6781002281XX:service/AdminCluster/CdkFargateStack-ServiceD69D759B-sm274jjTfbP7 AWS::ECS::Service CREATE_IN_PROGRESS Resource creation Initiated -
However I have no idea where to start.
This docker image receive the access from 8011, so in local
it works in local like this
docker run -p 8011:8011 -it st_admin_site:latest
I check CloudWatch but can't find the log.
This is my cdk command
constructor(scope: Construct, id: string, props?: StackProps) {
super(scope, id, props);
const cluster = new ecs.Cluster(this, "SampleCluster", {
clusterName: "AdminCluster"
});
const adminImage = ecs.ContainerImage.fromRegistry('st_admin_site:latest');
const taskDefinition = new ecs.FargateTaskDefinition(this, "TaskDef");
const container = taskDefinition.addContainer("DefaultContainer", {
image: adminImage,
memoryLimitMiB: 512,
cpu: 256
});
container.addPortMappings({
containerPort: 8011
});
const ecsService = new ecs.FargateService(this, "Service", {
cluster,
taskDefinition,
desiredCount: 2
});
const lb = new elb.ApplicationLoadBalancer(this, "LB", {
vpc: cluster.vpc,
internetFacing: true
});
const listener = lb.addListener("Listener", { port: 80 });
const targetGroup = listener.addTargets("ECS", {
protocol: elb.ApplicationProtocol.HTTP,
port: 8011,
targets: [ecsService]
});
And it makes the template.
{
"Resources": {
"SampleClusterB4B72990": {
"Type": "AWS::ECS::Cluster",
"Properties": {
"ClusterName": "AdminCluster"
},
"Metadata": {
"aws:cdk:path": "CdkFargateStack/SampleCluster/Resource"
}
},
"SampleClusterVpcD1C6ABD9": {
"Type": "AWS::EC2::VPC",
"Properties": {
"CidrBlock": "10.0.0.0/16",
"EnableDnsHostnames": true,
"EnableDnsSupport": true,
"InstanceTenancy": "default",
"Tags": [
{
"Key": "Name",
"Value": "CdkFargateStack/SampleCluster/Vpc"
}
]
},
"Metadata": {
"aws:cdk:path": "CdkFargateStack/SampleCluster/Vpc/Resource"
}
},
"SampleClusterVpcPublicSubnet1SubnetE377A512": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.0.0.0/18",
"VpcId": {
"Ref": "SampleClusterVpcD1C6ABD9"
},
"AvailabilityZone": {
"Fn::Select": [
0,
{
"Fn::GetAZs": ""
}
]
},
"MapPublicIpOnLaunch": true,
"Tags": [
{
"Key": "aws-cdk:subnet-name",
"Value": "Public"
},
{
"Key": "aws-cdk:subnet-type",
"Value": "Public"
},
{
"Key": "Name",
"Value": "CdkFargateStack/SampleCluster/Vpc/PublicSubnet1"
}
]
},
"Metadata": {
"aws:cdk:path": "CdkFargateStack/SampleCluster/Vpc/PublicSubnet1/Subnet"
}
},
"SampleClusterVpcPublicSubnet1RouteTable7114D244": {
"Type": "AWS::EC2::RouteTable",
"Properties": {
"VpcId": {
"Ref": "SampleClusterVpcD1C6ABD9"
},
"Tags": [
{
"Key": "Name",
"Value": "CdkFargateStack/SampleCluster/Vpc/PublicSubnet1"
}
]
},
"Metadata": {
"aws:cdk:path": "CdkFargateStack/SampleCluster/Vpc/PublicSubnet1/RouteTable"
}
},
"SampleClusterVpcPublicSubnet1RouteTableAssociation0B5402E3": {
"Type": "AWS::EC2::SubnetRouteTableAssociation",
"Properties": {
"RouteTableId": {
"Ref": "SampleClusterVpcPublicSubnet1RouteTable7114D244"
},
"SubnetId": {
"Ref": "SampleClusterVpcPublicSubnet1SubnetE377A512"
}
},
"Metadata": {
"aws:cdk:path": "CdkFargateStack/SampleCluster/Vpc/PublicSubnet1/RouteTableAssociation"
}
},
"SampleClusterVpcPublicSubnet1DefaultRoute28A82BC4": {
"Type": "AWS::EC2::Route",
"Properties": {
"RouteTableId": {
"Ref": "SampleClusterVpcPublicSubnet1RouteTable7114D244"
},
"DestinationCidrBlock": "0.0.0.0/0",
"GatewayId": {
"Ref": "SampleClusterVpcIGW21649D5C"
}
},
"DependsOn": [
"SampleClusterVpcVPCGW39AFB859"
],
"Metadata": {
"aws:cdk:path": "CdkFargateStack/SampleCluster/Vpc/PublicSubnet1/DefaultRoute"
}
},
"SampleClusterVpcPublicSubnet1EIPD2C3FC83": {
"Type": "AWS::EC2::EIP",
"Properties": {
"Domain": "vpc",
"Tags": [
{
"Key": "Name",
"Value": "CdkFargateStack/SampleCluster/Vpc/PublicSubnet1"
}
]
},
"Metadata": {
"aws:cdk:path": "CdkFargateStack/SampleCluster/Vpc/PublicSubnet1/EIP"
}
},
"SampleClusterVpcPublicSubnet1NATGateway715FE613": {
"Type": "AWS::EC2::NatGateway",
"Properties": {
"SubnetId": {
"Ref": "SampleClusterVpcPublicSubnet1SubnetE377A512"
},
"AllocationId": {
"Fn::GetAtt": [
"SampleClusterVpcPublicSubnet1EIPD2C3FC83",
"AllocationId"
]
},
"Tags": [
{
"Key": "Name",
"Value": "CdkFargateStack/SampleCluster/Vpc/PublicSubnet1"
}
]
},
"Metadata": {
"aws:cdk:path": "CdkFargateStack/SampleCluster/Vpc/PublicSubnet1/NATGateway"
}
},
"SampleClusterVpcPublicSubnet2SubnetB88D2B08": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.0.64.0/18",
"VpcId": {
"Ref": "SampleClusterVpcD1C6ABD9"
},
"AvailabilityZone": {
"Fn::Select": [
1,
{
"Fn::GetAZs": ""
}
]
},
"MapPublicIpOnLaunch": true,
"Tags": [
{
"Key": "aws-cdk:subnet-name",
"Value": "Public"
},
{
"Key": "aws-cdk:subnet-type",
"Value": "Public"
},
{
"Key": "Name",
"Value": "CdkFargateStack/SampleCluster/Vpc/PublicSubnet2"
}
]
},
"Metadata": {
"aws:cdk:path": "CdkFargateStack/SampleCluster/Vpc/PublicSubnet2/Subnet"
}
},
"SampleClusterVpcPublicSubnet2RouteTable8A11EEAD": {
"Type": "AWS::EC2::RouteTable",
"Properties": {
"VpcId": {
"Ref": "SampleClusterVpcD1C6ABD9"
},
"Tags": [
{
"Key": "Name",
"Value": "CdkFargateStack/SampleCluster/Vpc/PublicSubnet2"
}
]
},
"Metadata": {
"aws:cdk:path": "CdkFargateStack/SampleCluster/Vpc/PublicSubnet2/RouteTable"
}
},
"SampleClusterVpcPublicSubnet2RouteTableAssociation857BF408": {
"Type": "AWS::EC2::SubnetRouteTableAssociation",
"Properties": {
"RouteTableId": {
"Ref": "SampleClusterVpcPublicSubnet2RouteTable8A11EEAD"
},
"SubnetId": {
"Ref": "SampleClusterVpcPublicSubnet2SubnetB88D2B08"
}
},
"Metadata": {
"aws:cdk:path": "CdkFargateStack/SampleCluster/Vpc/PublicSubnet2/RouteTableAssociation"
}
},
"SampleClusterVpcPublicSubnet2DefaultRouteFD4087CF": {
"Type": "AWS::EC2::Route",
"Properties": {
"RouteTableId": {
"Ref": "SampleClusterVpcPublicSubnet2RouteTable8A11EEAD"
},
"DestinationCidrBlock": "0.0.0.0/0",
"GatewayId": {
"Ref": "SampleClusterVpcIGW21649D5C"
}
},
"DependsOn": [
"SampleClusterVpcVPCGW39AFB859"
],
"Metadata": {
"aws:cdk:path": "CdkFargateStack/SampleCluster/Vpc/PublicSubnet2/DefaultRoute"
}
},
"SampleClusterVpcPublicSubnet2EIPCB2281EA": {
"Type": "AWS::EC2::EIP",
"Properties": {
"Domain": "vpc",
"Tags": [
{
"Key": "Name",
"Value": "CdkFargateStack/SampleCluster/Vpc/PublicSubnet2"
}
]
},
"Metadata": {
"aws:cdk:path": "CdkFargateStack/SampleCluster/Vpc/PublicSubnet2/EIP"
}
},
"SampleClusterVpcPublicSubnet2NATGatewayB385D543": {
"Type": "AWS::EC2::NatGateway",
"Properties": {
"SubnetId": {
"Ref": "SampleClusterVpcPublicSubnet2SubnetB88D2B08"
},
"AllocationId": {
"Fn::GetAtt": [
"SampleClusterVpcPublicSubnet2EIPCB2281EA",
"AllocationId"
]
},
"Tags": [
{
"Key": "Name",
"Value": "CdkFargateStack/SampleCluster/Vpc/PublicSubnet2"
}
]
},
"Metadata": {
"aws:cdk:path": "CdkFargateStack/SampleCluster/Vpc/PublicSubnet2/NATGateway"
}
},
"SampleClusterVpcPrivateSubnet1Subnet24256A44": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.0.128.0/18",
"VpcId": {
"Ref": "SampleClusterVpcD1C6ABD9"
},
"AvailabilityZone": {
"Fn::Select": [
0,
{
"Fn::GetAZs": ""
}
]
},
"MapPublicIpOnLaunch": false,
"Tags": [
{
"Key": "aws-cdk:subnet-name",
"Value": "Private"
},
{
"Key": "aws-cdk:subnet-type",
"Value": "Private"
},
{
"Key": "Name",
"Value": "CdkFargateStack/SampleCluster/Vpc/PrivateSubnet1"
}
]
},
"Metadata": {
"aws:cdk:path": "CdkFargateStack/SampleCluster/Vpc/PrivateSubnet1/Subnet"
}
},
"SampleClusterVpcPrivateSubnet1RouteTable55080EB4": {
"Type": "AWS::EC2::RouteTable",
"Properties": {
"VpcId": {
"Ref": "SampleClusterVpcD1C6ABD9"
},
"Tags": [
{
"Key": "Name",
"Value": "CdkFargateStack/SampleCluster/Vpc/PrivateSubnet1"
}
]
},
"Metadata": {
"aws:cdk:path": "CdkFargateStack/SampleCluster/Vpc/PrivateSubnet1/RouteTable"
}
},
"SampleClusterVpcPrivateSubnet1RouteTableAssociationBC171CD8": {
"Type": "AWS::EC2::SubnetRouteTableAssociation",
"Properties": {
"RouteTableId": {
"Ref": "SampleClusterVpcPrivateSubnet1RouteTable55080EB4"
},
"SubnetId": {
"Ref": "SampleClusterVpcPrivateSubnet1Subnet24256A44"
}
},
"Metadata": {
"aws:cdk:path": "CdkFargateStack/SampleCluster/Vpc/PrivateSubnet1/RouteTableAssociation"
}
},
"SampleClusterVpcPrivateSubnet1DefaultRouteB1C5B147": {
"Type": "AWS::EC2::Route",
"Properties": {
"RouteTableId": {
"Ref": "SampleClusterVpcPrivateSubnet1RouteTable55080EB4"
},
"DestinationCidrBlock": "0.0.0.0/0",
"NatGatewayId": {
"Ref": "SampleClusterVpcPublicSubnet1NATGateway715FE613"
}
},
"Metadata": {
"aws:cdk:path": "CdkFargateStack/SampleCluster/Vpc/PrivateSubnet1/DefaultRoute"
}
},
"SampleClusterVpcPrivateSubnet2Subnet25DCB36D": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.0.192.0/18",
"VpcId": {
"Ref": "SampleClusterVpcD1C6ABD9"
},
"AvailabilityZone": {
"Fn::Select": [
1,
{
"Fn::GetAZs": ""
}
]
},
"MapPublicIpOnLaunch": false,
"Tags": [
{
"Key": "aws-cdk:subnet-name",
"Value": "Private"
},
{
"Key": "aws-cdk:subnet-type",
"Value": "Private"
},
{
"Key": "Name",
"Value": "CdkFargateStack/SampleCluster/Vpc/PrivateSubnet2"
}
]
},
"Metadata": {
"aws:cdk:path": "CdkFargateStack/SampleCluster/Vpc/PrivateSubnet2/Subnet"
}
},
"SampleClusterVpcPrivateSubnet2RouteTable35B9289E": {
"Type": "AWS::EC2::RouteTable",
"Properties": {
"VpcId": {
"Ref": "SampleClusterVpcD1C6ABD9"
},
"Tags": [
{
"Key": "Name",
"Value": "CdkFargateStack/SampleCluster/Vpc/PrivateSubnet2"
}
]
},
"Metadata": {
"aws:cdk:path": "CdkFargateStack/SampleCluster/Vpc/PrivateSubnet2/RouteTable"
}
},
"SampleClusterVpcPrivateSubnet2RouteTableAssociationC174EB56": {
"Type": "AWS::EC2::SubnetRouteTableAssociation",
"Properties": {
"RouteTableId": {
"Ref": "SampleClusterVpcPrivateSubnet2RouteTable35B9289E"
},
"SubnetId": {
"Ref": "SampleClusterVpcPrivateSubnet2Subnet25DCB36D"
}
},
"Metadata": {
"aws:cdk:path": "CdkFargateStack/SampleCluster/Vpc/PrivateSubnet2/RouteTableAssociation"
}
},
"SampleClusterVpcPrivateSubnet2DefaultRoute74AE4D72": {
"Type": "AWS::EC2::Route",
"Properties": {
"RouteTableId": {
"Ref": "SampleClusterVpcPrivateSubnet2RouteTable35B9289E"
},
"DestinationCidrBlock": "0.0.0.0/0",
"NatGatewayId": {
"Ref": "SampleClusterVpcPublicSubnet2NATGatewayB385D543"
}
},
"Metadata": {
"aws:cdk:path": "CdkFargateStack/SampleCluster/Vpc/PrivateSubnet2/DefaultRoute"
}
},
"SampleClusterVpcIGW21649D5C": {
"Type": "AWS::EC2::InternetGateway",
"Properties": {
"Tags": [
{
"Key": "Name",
"Value": "CdkFargateStack/SampleCluster/Vpc"
}
]
},
"Metadata": {
"aws:cdk:path": "CdkFargateStack/SampleCluster/Vpc/IGW"
}
},
"SampleClusterVpcVPCGW39AFB859": {
"Type": "AWS::EC2::VPCGatewayAttachment",
"Properties": {
"VpcId": {
"Ref": "SampleClusterVpcD1C6ABD9"
},
"InternetGatewayId": {
"Ref": "SampleClusterVpcIGW21649D5C"
}
},
"Metadata": {
"aws:cdk:path": "CdkFargateStack/SampleCluster/Vpc/VPCGW"
}
},
"TaskDefTaskRole1EDB4A67": {
"Type": "AWS::IAM::Role",
"Properties": {
"AssumeRolePolicyDocument": {
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": "ecs-tasks.amazonaws.com"
}
}
],
"Version": "2012-10-17"
}
},
"Metadata": {
"aws:cdk:path": "CdkFargateStack/TaskDef/TaskRole/Resource"
}
},
"TaskDef54694570": {
"Type": "AWS::ECS::TaskDefinition",
"Properties": {
"ContainerDefinitions": [
{
"Cpu": 256,
"Essential": true,
"Image": "st_admin_site:latest",
"Memory": 512,
"Name": "DefaultContainer",
"PortMappings": [
{
"ContainerPort": 8011,
"Protocol": "tcp"
}
]
}
],
"Cpu": "256",
"Family": "CdkFargateStackTaskDef424235B4",
"Memory": "512",
"NetworkMode": "awsvpc",
"RequiresCompatibilities": [
"FARGATE"
],
"TaskRoleArn": {
"Fn::GetAtt": [
"TaskDefTaskRole1EDB4A67",
"Arn"
]
}
},
"Metadata": {
"aws:cdk:path": "CdkFargateStack/TaskDef/Resource"
}
},
"ServiceD69D759B": {
"Type": "AWS::ECS::Service",
"Properties": {
"Cluster": {
"Ref": "SampleClusterB4B72990"
},
"DeploymentConfiguration": {
"MaximumPercent": 200,
"MinimumHealthyPercent": 50
},
"DesiredCount": 2,
"EnableECSManagedTags": false,
"HealthCheckGracePeriodSeconds": 60,
"LaunchType": "FARGATE",
"LoadBalancers": [
{
"ContainerName": "DefaultContainer",
"ContainerPort": 8011,
"TargetGroupArn": {
"Ref": "LBListenerECSGroup1D445DF5"
}
}
],
"NetworkConfiguration": {
"AwsvpcConfiguration": {
"AssignPublicIp": "DISABLED",
"SecurityGroups": [
{
"Fn::GetAtt": [
"ServiceSecurityGroupC96ED6A7",
"GroupId"
]
}
],
"Subnets": [
{
"Ref": "SampleClusterVpcPrivateSubnet1Subnet24256A44"
},
{
"Ref": "SampleClusterVpcPrivateSubnet2Subnet25DCB36D"
}
]
}
},
"TaskDefinition": {
"Ref": "TaskDef54694570"
}
},
"DependsOn": [
"LBListenerECSGroup1D445DF5",
"LBListener49E825B4"
],
"Metadata": {
"aws:cdk:path": "CdkFargateStack/Service/Service"
}
},
"ServiceSecurityGroupC96ED6A7": {
"Type": "AWS::EC2::SecurityGroup",
"Properties": {
"GroupDescription": "CdkFargateStack/Service/SecurityGroup",
"SecurityGroupEgress": [
{
"CidrIp": "0.0.0.0/0",
"Description": "Allow all outbound traffic by default",
"IpProtocol": "-1"
}
],
"VpcId": {
"Ref": "SampleClusterVpcD1C6ABD9"
}
},
"Metadata": {
"aws:cdk:path": "CdkFargateStack/Service/SecurityGroup/Resource"
}
},
"ServiceSecurityGroupfromCdkFargateStackLBSecurityGroupF16A57958011E231ABAF": {
"Type": "AWS::EC2::SecurityGroupIngress",
"Properties": {
"IpProtocol": "tcp",
"Description": "Load balancer to target",
"FromPort": 8011,
"GroupId": {
"Fn::GetAtt": [
"ServiceSecurityGroupC96ED6A7",
"GroupId"
]
},
"SourceSecurityGroupId": {
"Fn::GetAtt": [
"LBSecurityGroup8A41EA2B",
"GroupId"
]
},
"ToPort": 8011
},
"Metadata": {
"aws:cdk:path": "CdkFargateStack/Service/SecurityGroup/from CdkFargateStackLBSecurityGroupF16A5795:8011"
}
},
"LB8A12904C": {
"Type": "AWS::ElasticLoadBalancingV2::LoadBalancer",
"Properties": {
"LoadBalancerAttributes": [
{
"Key": "deletion_protection.enabled",
"Value": "false"
}
],
"Scheme": "internet-facing",
"SecurityGroups": [
{
"Fn::GetAtt": [
"LBSecurityGroup8A41EA2B",
"GroupId"
]
}
],
"Subnets": [
{
"Ref": "SampleClusterVpcPublicSubnet1SubnetE377A512"
},
{
"Ref": "SampleClusterVpcPublicSubnet2SubnetB88D2B08"
}
],
"Type": "application"
},
"DependsOn": [
"SampleClusterVpcPublicSubnet1DefaultRoute28A82BC4",
"SampleClusterVpcPublicSubnet2DefaultRouteFD4087CF"
],
"Metadata": {
"aws:cdk:path": "CdkFargateStack/LB/Resource"
}
},
"LBSecurityGroup8A41EA2B": {
"Type": "AWS::EC2::SecurityGroup",
"Properties": {
"GroupDescription": "Automatically created Security Group for ELB CdkFargateStackLBFC3A10CF",
"SecurityGroupIngress": [
{
"CidrIp": "0.0.0.0/0",
"Description": "Allow from anyone on port 80",
"FromPort": 80,
"IpProtocol": "tcp",
"ToPort": 80
}
],
"VpcId": {
"Ref": "SampleClusterVpcD1C6ABD9"
}
},
"Metadata": {
"aws:cdk:path": "CdkFargateStack/LB/SecurityGroup/Resource"
}
},
"LBSecurityGrouptoCdkFargateStackServiceSecurityGroupB491C33C801194A30A9B": {
"Type": "AWS::EC2::SecurityGroupEgress",
"Properties": {
"GroupId": {
"Fn::GetAtt": [
"LBSecurityGroup8A41EA2B",
"GroupId"
]
},
"IpProtocol": "tcp",
"Description": "Load balancer to target",
"DestinationSecurityGroupId": {
"Fn::GetAtt": [
"ServiceSecurityGroupC96ED6A7",
"GroupId"
]
},
"FromPort": 8011,
"ToPort": 8011
},
"Metadata": {
"aws:cdk:path": "CdkFargateStack/LB/SecurityGroup/to CdkFargateStackServiceSecurityGroupB491C33C:8011"
}
},
"LBListener49E825B4": {
"Type": "AWS::ElasticLoadBalancingV2::Listener",
"Properties": {
"DefaultActions": [
{
"TargetGroupArn": {
"Ref": "LBListenerECSGroup1D445DF5"
},
"Type": "forward"
}
],
"LoadBalancerArn": {
"Ref": "LB8A12904C"
},
"Port": 80,
"Protocol": "HTTP"
},
"Metadata": {
"aws:cdk:path": "CdkFargateStack/LB/Listener/Resource"
}
},
"LBListenerECSGroup1D445DF5": {
"Type": "AWS::ElasticLoadBalancingV2::TargetGroup",
"Properties": {
"Port": 8011,
"Protocol": "HTTP",
"TargetGroupAttributes": [
{
"Key": "stickiness.enabled",
"Value": "false"
}
],
"TargetType": "ip",
"VpcId": {
"Ref": "SampleClusterVpcD1C6ABD9"
}
},
"Metadata": {
"aws:cdk:path": "CdkFargateStack/LB/Listener/ECSGroup/Resource"
}
},
"CDKMetadata": {
"Type": "AWS::CDK::Metadata",
"Properties": {
"Analytics": "v2:deflate64:H4sIAAAAAAAA/31Ry27CMBD8Fu7GBSr1TilFSFUVJYhr5ThbumDWkR9BKMq/184D0lbqaWdn18nMzoLPZ3w2ERc7lcVpqjDndeaEPLFAfdQgLa9XylsHhq0+aYCvwhyEg52wpxf4REKHmuLCb0aTE0hgRlz/NgNToYT4qIcNA7ng9b6UkdwnK5b4XKHMfE7g2sUbSrWPv88V3Pk7t7RWSxSDqHYQwXqbxPIu3CYouIgrSwxWUcztw1sK/gIeFjolfbd04TRfZyDHMpDeoLtujPZlZ+I/YksHA9b+4dct3TAUZ16nurMTaziGEtahVFoUuVCCJNKhCvdZlmU4SmvuLcye21kXz49+vIchNep3Bjya70IkwfKgfNQ2DUvBam+6pMY4ZFu0iTaMdAH8aB+q+ROfP/LF5GgRp8aTwzPwtKvfgpQF22sCAAA="
},
"Metadata": {
"aws:cdk:path": "CdkFargateStack/CDKMetadata/Default"
},
"Condition": "CDKMetadataAvailable"
}
},
TEST
I am checking the log in in aws web console.
Cluster > AdminCluster > service: CdkFargateStack-ServiceD69D759B-cYrAHaRDN4mF
in event tab,
There are log like this
Service tries to start the task every one minutes.
TEST
ECS supports docker-compose style deployment.
So I try this with same image, then it works well
$docker context ls
default * moby Current DOCKER_HOST based configuration unix:///var/run/docker.sock swarm
desktop-linux moby unix:///Users/whitebear/.docker/run/docker.sock
docker-lamp-ecs ecs
$docker context use docker-lamp-ecs
$docker compose docker-compose.yml up
this deployment finished correctly container starts on ECS
However it fails in CDK.
SOLUTION
I found out the solution.
This could work
const adminRepo = ecr.Repository.fromRepositoryArn(this, 'AdminRepository', 'arn:aws:ecr:ap-northeast-1:678100XXXXXX:repository/st_admin_site')
const adminImage = ecs.ContainerImage.fromEcrRepository(adminRepo,"latest");
The previous code,
const adminImage = ecs.ContainerImage.fromRegistry('st_admin_site:latest')
it doesn't mean to get my ecrRepository....
I use ARN instead.
This is stupid mistakes.
However there is not the way to get the log.
So it takes long time to find out.
Thank you for your help.
I had some stacks that took more than 30 minutes in the past :D How long were you waiting ?
What was the resources part looking ? What was already created, what was still "in action" :) ?
Did something crashed while creating and was in multiple retries ?
Not much information to really know what's happening, but IIRC if your container fails to start it will fail to create the ECS service. You can check if the service was actually created in the ECS console, and if it exists, check the event log to see if they aren't failing. If they are failing, you can check the reason in the task.
hello I am building electron app for the mac platform and having trouble notarize the app using Forge and getting this error:
Packaging ApplicationWARNING: Code sign failed; please retry manually. Error: Command failed: spctl --assess --type execute --verbose --ignore-cache --no-cache /var/folders/q7//T/electron-packager/darwin-arm64/Integration-darwin-arm64/Integration.app
/var/folders/q7/*/T/electron-packager/darwin-arm64/Integration-darwin-arm64/Integration.app: rejected
source=Unnotarized Developer ID
my forge config
"forge": {
"packagerConfig": {
"appBundleId": "com.anyfolder.integrations",
"osxSign": {
"identity": "Developer ID Application: ****** (****)",
"hardened-runtime": true,
"entitlements": "entitlements.plist",
"entitlements-inherit": "entitlements.plist",
"signature-flags": "library"
},
"osxNotarize": {
"appleId": "myid#id.com",
"appleIdPassword": "my-password"
},
"protocols": [
{
"name": "Any Folder",
"schemes": [
"electron-****"
]
}
],
"icon": "public/images/icon.ico"
},
"publishers": [
{
"name": "#electron-forge/publisher-s3",
"config": {
"bucket": "*******",
"folder": "integrations",
"public": true
}
},
{
"name": "#electron-forge/publisher-github",
"config": {
"repository": {
"owner": "****",
"name": "****"
},
"draft": false,
"prerelease": false
}
}
],
"makers": [
{
"name": "#electron-forge/maker-squirrel",
"config": {
"name": "integrations"
}
},
{
"name": "#electron-forge/maker-dmg",
"config": {
"icon": "public/images/icon.icns",
"format": "ULFO",
"name": "Name",
"overwrite": true,
"debug": true
}
}
],
"plugins": [
[
"#electron-forge/plugin-webpack",
{
"mainConfig": "./webpack.main.config.js",
"renderer": {
"config": "./webpack.renderer.config.js",
"entryPoints": [
{
"html": "./src/render/imageEditor/index.html",
"js": "./src/render/imageEditor/index.tsx",
"name": "capture_window",
"preload": {
"js": "./src/render/imageEditor/preload.ts"
}
},
{
"name": "main_window",
"html": "./src/index.html",
"js": "./src/render/main/index.tsx",
"preload": {
"js": "./src/render/main/preload.ts"
}
},
{
"name": "integrations_menu",
"html": "./src/index.html",
"js": "./src/render/integrations/index.tsx",
"preload": {
"js": "./src/render/integrations/preload.ts"
}
}
]
}
}
]
]
}
I'm trying to use the TRESTResponseDataSetAdapter.
Every combination that I've tried for the JSON RootElement property fails
You can view the content by running this in your browser:
https://api.hubapi.com/contacts/v1/lists/all/contacts/all?hapikey=Demo&count=1000
{
"contacts":[
{
"addedAt":1405347851360,
"vid":154835,
"canonical-vid":154835,
"merged-vids":[
],
"portal-id":62515,
"is-contact":true,
"profile-token":"AO_T-mMn77ArlMSBCTdpOp0rf0qYYooZ7bHB6ehvufx9uNoV0Pyuiq1wq-A83BQmzFVFVC45T8S6tXhkq_7fcDi5Wzne7VXydwTvrKIViisZNBjWhUjJ8OiXhXW0owESlE2QCh2_rZsy",
"profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mMn77ArlMSBCTdpOp0rf0qYYooZ7bHB6ehvufx9uNoV0Pyuiq1wq-A83BQmzFVFVC45T8S6tXhkq_7fcDi5Wzne7VXydwTvrKIViisZNBjWhUjJ8OiXhXW0owESlE2QCh2_rZsy/",
"properties":{
"firstname":{
"value":"HubSpot"
},
"lastmodifieddate":{
"value":"1429569233340"
},
"lastname":{
"value":"Test"
}
},
"form-submissions":[
{
"conversion-id":"b18f9fd8-b8d3-49e5-898a-ac301fac93e9",
"timestamp":1405347851180,
"form-id":"b844ad5e-32bd-41e1-b0e6-ed990c5f3d1b",
"portal-id":62515,
"page-url":"http://demo.hubapi.com/your-stunning-headline-30",
"page-title":"Your stunning headline!",
"page-id":"324527",
"title":"My New Form",
"meta-data":[
]
}
],
"identity-profiles":[
{
"vid":154835,
"saved-at-timestamp":1405347851237,
"deleted-changed-timestamp":0,
"identities":[
{
"type":"EMAIL",
"value":"test#hubspot.com",
"timestamp":1405347851180
},
{
"type":"LEAD_GUID",
"value":"c8f20860-d3d6-4b57-b092-86a07cebdcbc",
"timestamp":1405347851237
}
]
}
],
"merge-audits":[
]
},
{
"addedAt":1390569372731,
"vid":196181,
"canonical-vid":196181,
"merged-vids":[
],
"portal-id":62515,
"is-contact":true,
"profile-token":"AO_T-mNWKZQBRv0UiQpPnG-WPBgVlfYwFgdTyJW3sU9frlA4esRYMOtMpo4OQMh736HGvJpuDLAuJexFXkyrIPu7eK-hxFYwGoqefbbP1cQeh6B0mRPE-iU1dhYRhRJsWyroaToFvFuo",
"profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mNWKZQBRv0UiQpPnG-WPBgVlfYwFgdTyJW3sU9frlA4esRYMOtMpo4OQMh736HGvJpuDLAuJexFXkyrIPu7eK-hxFYwGoqefbbP1cQeh6B0mRPE-iU1dhYRhRJsWyroaToFvFuo/",
"properties":{
"firstname":{
"value":"Charles"
},
"lastmodifieddate":{
"value":"1429569231725"
},
"company":{
"value":""
},
"lastname":{
"value":"Gowland"
}
},
"form-submissions":[
],
"identity-profiles":[
{
"vid":196181,
"saved-at-timestamp":1390569372649,
"deleted-changed-timestamp":0,
"identities":[
{
"type":"EMAIL",
"value":"clg#gburnette.com",
"timestamp":1390568711002
},
{
"type":"LEAD_GUID",
"value":"dca0d8a2-fa9c-4ca6-b5ef-c1bfb4a0bed4",
"timestamp":1390569372636
}
]
}
],
"merge-audits":[
]
},
{
"addedAt":1390569372834,
"vid":196182,
"canonical-vid":196182,
"merged-vids":[
],
"portal-id":62515,
"is-contact":true,
"profile-token":"AO_T-mPTJ_EIS2780cJONDGKv5bmchukJnQ37QmmSc-lPJacEyzXo8piybhaAhQzT0HBXxq0QYXFU_4wN5ewYsclTt8WE3KAxx6neusNNYGr8aEiy-s6izAG-CCehTdomM5Pai4YOKue",
"profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mPTJ_EIS2780cJONDGKv5bmchukJnQ37QmmSc-lPJacEyzXo8piybhaAhQzT0HBXxq0QYXFU_4wN5ewYsclTt8WE3KAxx6neusNNYGr8aEiy-s6izAG-CCehTdomM5Pai4YOKue/",
"properties":{
"firstname":{
"value":"Curtis"
},
"lastmodifieddate":{
"value":"1429569238098"
},
"company":{
"value":""
},
"lastname":{
"value":"Romig"
}
},
"form-submissions":[
],
"identity-profiles":[
{
"vid":196182,
"saved-at-timestamp":1390569372699,
"deleted-changed-timestamp":0,
"identities":[
{
"type":"EMAIL",
"value":"curtis.romig#bryancave.com",
"timestamp":1390568725415
},
{
"type":"LEAD_GUID",
"value":"e18dc184-0238-48f1-a8a2-4476733f50d3",
"timestamp":1390569372641
}
]
}
],
"merge-audits":[
]
},
{
"addedAt":1390569372757,
"vid":196183,
"canonical-vid":196183,
"merged-vids":[
],
"portal-id":62515,
"is-contact":true,
"profile-token":"AO_T-mOq49asR9pF4P9paqXhVApLjs9CXDFqCFs4BL7Y5z7TRYRoSC9i8cXxGOdXZqC-3D1doXT5G-pmAG283AFo0BYY3D-1AV2VhwIlVZ3t1KF-6G7DBQw80lRqBjPbJhtLnY7U6rd-",
"profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mOq49asR9pF4P9paqXhVApLjs9CXDFqCFs4BL7Y5z7TRYRoSC9i8cXxGOdXZqC-3D1doXT5G-pmAG283AFo0BYY3D-1AV2VhwIlVZ3t1KF-6G7DBQw80lRqBjPbJhtLnY7U6rd-/",
"properties":{
"firstname":{
"value":"Eugene"
},
"lastmodifieddate":{
"value":"1429569256338"
},
"company":{
"value":""
},
"lastname":{
"value":"Klibanoff"
}
},
"form-submissions":[
],
"identity-profiles":[
{
"vid":196183,
"saved-at-timestamp":1390569372682,
"deleted-changed-timestamp":0,
"identities":[
{
"type":"EMAIL",
"value":"eklibanoff#incomm.com",
"timestamp":1390568722786
},
{
"type":"LEAD_GUID",
"value":"276f1a0f-ce8f-4069-9b7a-405f9e14971a",
"timestamp":1390569372674
}
]
}
],
"merge-audits":[
]
},
{
"addedAt":1390569372800,
"vid":196184,
"canonical-vid":196184,
"merged-vids":[
],
"portal-id":62515,
"is-contact":true,
"profile-token":"AO_T-mMay6vd3gbNXXOGGn7WYa4332kjWEY6hYvggd98z-MYeHHaXL8BqAHSmsGQ1VVuN9_JOUPlqQ5ZC4e0-fNjOqj-yNp23nsqldKBYY0WF-m5pgnOGEwXEV2eLNVJmFffQ0U3SXXL",
"profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mMay6vd3gbNXXOGGn7WYa4332kjWEY6hYvggd98z-MYeHHaXL8BqAHSmsGQ1VVuN9_JOUPlqQ5ZC4e0-fNjOqj-yNp23nsqldKBYY0WF-m5pgnOGEwXEV2eLNVJmFffQ0U3SXXL/",
"properties":{
"firstname":{
"value":"James C. & Brenda L."
},
"lastmodifieddate":{
"value":"1429569255451"
},
"company":{
"value":""
},
"lastname":{
"value":"Kellling"
}
},
"form-submissions":[
],
"identity-profiles":[
{
"vid":196184,
"saved-at-timestamp":1390569372744,
"deleted-changed-timestamp":0,
"identities":[
{
"type":"EMAIL",
"value":"jameskelling#bellsouth.net",
"timestamp":1390568911277
},
{
"type":"LEAD_GUID",
"value":"4b92ccc6-d777-4e3e-90d9-bc4722329c16",
"timestamp":1390569372738
}
]
}
],
"merge-audits":[
]
}
],
"has-more":true,
"vid-offset":196184
}
I'm trying to build a ClientDataSet that includes Company, FirstName, LastName and EMAIL
Can someone please view the content and identify the correct RootElement for me ?
There is no plug-and-play way for this kind of data structure to map inside a TClientDataSet.
The mapping can be done by TRESTResponseDataSetAdapter on an array of objects like this
[
{
"firstname": "John",
"lastname": "Doe",
"email": "john#doe.com"
},
{
"firstname": "Jane",
"lastname": "Doe",
"email": "jane#doe.com"
}
]
or even nested
{
"contacts": [
{
"firstname": "John",
"lastname": "Doe",
"email": "john#doe.com"
},
{
"firstname": "Jane",
"lastname": "Doe",
"email": "jane#doe.com"
}
]
}
when you set the RootElement property to contacts.
But not with this kind of nested structure you are getting from your REST API.
You have to know the structure and map that by hand