Hi,
I seem to be having issue with the grader on the Dynamic scalinn policy.
The policy is created and the lab works as expected. But grader doesn’t like it
@sukhdeepjohar thanks for the message. Could you please send me a screenshot of the submission report (if you click on “Submission Report” button next to “Submit” button). Thank you!
[Executed at: Fri Sep 20 8:35:02 PDT 2024]
Test 1 passed: Generated stress test to increase Networking Activity.
========================================================================================================================
Test 2 passed: Changed the inbound rules for the ALB Security Group.
========================================================================================================================
Test 3 passed: Launch Template was created and executed.
========================================================================================================================
Test 4 Part 1 failed: Expected Dynamic scaling policy with the name de-c1w3-scaling-policy to be created.
Test 4 Part 2 failed: PolicyType is expected to be TargetTrackingScaling.
Test 4 Part 3 failed: PredefinedMetricType is expected to be ALBRequestCountPerTarget.
Test 4 Part 4 failed: Target group is expected to be set as de-c1w3-ec2-tg-port80.
Test 4 Part 5 failed: Target value of the dinamic scaling policy should be equal to 60.
Test 4 Part 6 failed: Instance warmup of the dinamic scaling policy should be equal to 60 seconds.
========================================================================================================================
@sukhdeepjohar thanks for the screenshot. Unfortunately I can’t reproduce this problem based on the screenshots that you’ve sent.
Could you please try to run the following commands in the CloudShell and let me know what will be the outputs:
AUTO_SCALING_GROUP_NAME=`aws autoscaling describe-auto-scaling-groups --output text --query "AutoScalingGroups[0].AutoScalingGroupName"`
echo $AUTO_SCALING_GROUP_NAME
SCALING_POLICY=$(aws autoscaling describe-policies --auto-scaling-group-name $AUTO_SCALING_GROUP_NAME --query 'ScalingPolicies[?PolicyName==`de-c1w3-scaling-policy`]')
echo $SCALING_POLICY
Sure, will do.
So, looks like I need to configure again to capture this ?
the old configuration is lost.
Ok, I tried the second time but with the same result.
Test 4 Part 1 failed: Expected Dynamic scaling policy with the name de-c1w3-scaling-policy to be created.
Test 4 Part 2 failed: PolicyType is expected to be TargetTrackingScaling.
Test 4 Part 3 failed: PredefinedMetricType is expected to be ALBRequestCountPerTarget.
Test 4 Part 4 failed: Target group is expected to be set as de-c1w3-ec2-tg-port80.
Test 4 Part 5 failed: Target value of the dinamic scaling policy should be equal to 60.
Test 4 Part 6 failed: Instance warmup of the dinamic scaling policy should be equal to 60 seconds.
[cloudshell-user@ip-10-134-50-232 ~]$ AUTO_SCALING_GROUP_NAME=`aws autoscaling describe-auto-scaling-groups --output text --query "AutoScalingGroups[0].AutoScalingGroupName"`
[cloudshell-user@ip-10-134-50-232 ~]$ echo $AUTO_SCALING_GROUP_NAME
c62825a2722723l7661809t1w595257259253-AutoScalingGroup-8ylitHb1HnKS
[cloudshell-user@ip-10-134-50-232 ~]$ SCALING_POLICY=$(aws autoscaling describe-policies --auto-scaling-group-name $AUTO_SCALING_GROUP_NAME --query 'ScalingPolicies[?PolicyName==`de-c1w3-scaling-policy`]')
[cloudshell-user@ip-10-134-50-232 ~]$ echo $SCALING_POLICY
[ ]
But the dynamic scaling policy exists.
Ec2 instances are dynamically being created
@sukhdeepjohar thanks for the information. Could you please put the commands in the “```” before and after, so they get formatted properly in the message - I can’t see what were the outputs in your message.
Ah, I was trying to fix that, but to no avail
Thanks @esanina ! it should be readable now.
So Elena, this time, I started with the dynamic scaling policy and checked that the cli query is successful in capturing the SCALING_POLICY.
Then I went through the lab backwards. And the grader was happy.
I am not sure what was my mistake earlier as I had shown that the screenshots had the right policy name. And can’t imagine why the cli command would miss the policy earlier 2 times, if it existed
But anyway, thanks a lot for your help !
@sukhdeepjohar thanks for your patience and determination to get this sorted!
These labs are hard to troubleshoot as the resources get cleared up after 2 hours and there is just one file to look at. But I am glad that it’s all working now.
Just as a note: please use @ replying to staff members in the threads so we get notifications about the updates where needed.
Happy Learning!
@esanina I am facing the same problem. Its quite frustrating, have tried adding the dynamic policy multiple times but the submission report still shows:
Test 4 Part 1 failed: Expected Dynamic scaling policy with the name de-c1w3-scaling-policy to be created.
Test 4 Part 2 failed: PolicyType is expected to be TargetTrackingScaling.
Test 4 Part 3 failed: PredefinedMetricType is expected to be ALBRequestCountPerTarget.
Test 4 Part 4 failed: Target group is expected to be set as de-c1w3-ec2-tg-port80.
Test 4 Part 5 failed: Target value of the dinamic scaling policy should be equal to 60.
Test 4 Part 6 failed: Instance warmup of the dinamic scaling policy should be equal to 60 seconds.
Hi @gazaidi , it seems like the name of your dynamic scaling policy is not set to de-c1w3-scaling-policy (in step 7.2.3), please see the image below.
I hope this helps.
Jess
@jessica-dlai thanks a lot for the catch, completely missed it.