{
"Sid": "bucketpolicy1",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::userreports/*",
"Condition": {
"IpAddress": { "aws:SourceIp": "68.249.108.0/24" },
"NotIpAddress": { "aws:SourceIp": "68.249.108.128/32" }
}
}
aws ec2 disassociate-address --association-id eipassoc-2bebb712
aws ec2 associate-address --instance-id i-8b953 --allocation-id eipalloc-02d021a
aws ec2 release-address --association-id eipassoc-2bebb712
aws ec2 assign-address --instance-id i-8b953 --allocation-id eipalloc-02d021a
aws ec2 stop-instances --instance-ids i-8b953
wait 30
aws ec2 disassociate-address --association-id eipassoc-2bebb712
aws ec2 associate-address --instance-id i-8b953 --allocation-id eipalloc-02d021a
aws ec2 start-instances --instance-ids i-8b953
aws ec2 release-address --association-id eipassoc-2bebb712
aws ec2 associate-address --instance-id i-8b953 --allocation-id eipalloc-02d021a
aws ec2 stop-instances --instance-ids i-0b263919b6498b123
aws ec2 start-instances --instance-ids i-0b263919b6498b123
aws ec2 reboot-instances --instance-ids i-0b263919b6498b123
aws ec2 reboot-instances --instance-ids i-0b263919b6498b123
wait 30
aws ec2 start-instance --instance-ids i-0b263919b6498b123
aws ec2 reboot-instances --instance-ids i-0b263919b6498b123
aws ec2 start-instances --instance-ids i-0b263919b6498b123
Destination 1: 10.0.0.0/16, Target 1: local;
Destination 2: 0.0.0.0/0, Target 2: nat-09b4832
Destination 1: 10.0.0.0/24, Target 1: local;
Destination 2: 0.0.0.0/0, Target 2: igw-b2ff47d6
Destination 1: 10.0.0.0/24, Target 1: subnet-1948ba2;
Destination 2: 0.0.0.0/0, Target 2: nat-09b4832
Destination 1: 10.0.0.0/16, Target 1: vpc-12bd09ac2;
Destination 2: 0.0.0.0/0, Target 2: igw-b2ff47d6
IF (all match)
Path is /signup*
Query string is signup:new
Then
Forward to ecs-cluse-service <there is a typo - yes!
IF (all match)
Path is /sign/new/&
Query request method is POST
Then
Forward to ecs-cluse-service
aws ecs create-service \
--cluster production \
--service-name rest-api \
--task-definition rest-api:1 \
--desired-count 2 \
--launch-type "FARGATE" \
--network-configuration \
"awsvpcConfiguration={subnets=[subnet-0b29129ab],securityGroups=[sg-0b29129ab]}"