CodeDeploy Mini Lab3 | deployment fail

Hi Team,
I did CodeDeploy course Mini Lab3 twice but there is a part I’ve never passed yet.
I kept failing the deployment. Can anyone give me any tips to debug/solve this?

Where I stuck:

  • Question 7 where you create a deployment.
  • Error: “The overall deployment failed because too many individual instances failed deployment, too few healthy instances are available for deployment, or some instances in your deployment group are experiencing problems.”

What I did:

I checked if

I tried to see CodeDeploy logs in EC2 but was unable to connect the InstanceConnect

Other…

I got an error about a problem establishing the Systems Manager config after deployment group creation.

The account information I used for the last lab is below:

Account ID: 004180101735
IAM user: kk_labs_user_450734

Thank you in advance.
Chi

I think this has been picked up on Discord. In future please only post once.

Yes, I posted on Discord as well. Sorry for the two posts on different platforms. Will post once from now on. (Normally I got a response within a day but didn’t get any reaction from anyone for a few days this time, so thought Discord is not that active as Slack)

Hello, I’m also experiencing the same issue right now. Has anyone found the fix yet? I believe it has something to do with EC2 not having access to SSM from the error message I’m getting.


Error

There was a problem establishing AWS Systems Manager configuration: User: arn:aws:iam::835363682074:user/kk_labs_user_893447 is not authorized to perform: ssm:CreateAssociation on resource: arn:aws:ssm:us-east-1:835363682074:association/* because no identity-based policy allows the ssm:CreateAssociation action This is critical step to install CodeDeploy agent on your instances. Go to AWS System Manger to set up configuration.

Hi Henry,
I think the team is going to take a look at this issue. Someone passed this over to the team (see Discord). I have the same post on Discord. I am not sure if they contact me on Discord once they confirm, but if they do, I will post their response here as well.

1 Like

Hi @chihiro-the-chaseed,

The team found the root cause. They are working on fixes. I’ll update you once they push the fixes to prod labs.

Sorry for the inconvenience caused during the learning.

Regards,

1 Like

Hi @chihiro-the-chaseed ,

I got an update from the team. This issue has been resolved. Please try again.

Regards,

1 Like

Thank you!

Hi @henrylaurentkhosasih, the issue seems to be resolve :relieved:

1 Like

Thanks @chihiro-the-chaseed for the update! I’ll give it a try now. Hope you have a lovely weekend!

1 Like

Just tried and I can confirm that it’s working now! Thanks @chihiro-the-chaseed and @Tej-Singh-Rana :partying_face:

1 Like

Hi Team,
I tried the hands-on lab again. I am still not able to pass Mini lab3.
Can you help me debug?

error: “The overall deployment failed because too many individual instances failed deployment, too few healthy instances are available for deployment, or some instances in your deployment group are experiencing problems.”
It’s the same error that made me write this original post.

What I did for debugging:

I checked if EC2 volume is set correctly (gp2) and Region is set to us-east-1. Those were set correctly.

There were two IAM Roles available: EC2InstanceProfile and ecsInstanceRole. The instruction said “use EC2InstanceRole”, but there was no such role available.
Which one should I use?


I used both IAM Roles for the Instnace Profile;

  1. create EC2 with EC2InstanceProfile (and then Deployment failed)
  2. terminate the EC2 previously made
  3. create a new EC2 with ecsInstanceRole
  4. deployment failed

both failed, so I assume the problem is not with Instance Profile…

AWS count info:
Account ID: 363158248168
IAM user: kk_labs_user_982815

Hi @chihiro-the-chaseed,

Is it happening for the same lab and question?

Regards,

Hi @chihiro-the-chaseed
I tried the lab that you mentioned, with EC2InstanceProfile role, lab worked fine.
can you be more specific with steps next to ec2 instance creation. Kindly let me know further details.
Regards.

Hi @Tej-Singh-Rana and @JARUGU-PHANIVARDHAN

Thank you for your comments.

Is it happening for the same lab and question?

It was, but I found the cause. It was me not setting the Security Group properly.
I cleared Question 7 and successfully deployed the app to EC2.

But now, stuck at another issue: Question 8 (final question), I cannot see the page through IPv4 DNS. I set the inbound rule to have SSH and HTTP with Source Type “My IP” and the outbound rule of all traffic allowing all IPv4 and IPv6.
The error I got accessing EC2 IPv4 DNS is the following:

This site can’t be reachedec2-54-175-205-73.compute-1.amazonaws.com took too long to respond.
Try:

Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_TIMED_OUT

I attached screenshots of the config page when creating EC2.

I used ChatGPT and Googled to find ways to debug.

  • double checked the security group
  • check if VPC and IG are configured properly

Hi @chihiro-the-chaseed
Thank you for letting us know. Please make sure you are accessing oh http instead of https. because by default clicking on open option beside ip address will use https, so please make sure to use http, as we allowed connection on http in security group configuration.
Regards.

1 Like

Thank you so much!!
This was a good wake-up call for me. I need to study the network more.

(Note for some people if they experience something similar to mine accessing HTTP: the error “this site is not secure” may appear if you set your Chrome to allow secure access only)