Cloud9 cannot connect to my LightSail instance

0

I have a Cloud9 instance that is trying to access my LightSail instance but after about 5 minutes of trying to connect, on the top of the page I get the following error message:

This is taking longer than expected. The delay may be caused by high CPU usage in your environment, your T2 or T3 instance might be running out of burstable CPU capacity credits, or there are VPC configuration issues. Please check the VPC settings or the troubleshooting documentation for help with these issues.

However, I am using LightSail and NOT using an ec2 instance.

Here is my LightSail configuration: 4 GB RAM, 2 vCPUs, 80 GB SSD (Ubuntu)

I have restarted my LightSail instance with no difference. My website is performing normally (mongodb,mysql,nginx,etc...). I have tried the following, but I might have missed something:

  • df -h Shows file usage for all drives at or below 50% except a few of these.... /dev/loopXXX which says mounted on /snapXXX which are all at 100% (seems maybe not right) and /dev/xvdf mounted on /mnt/photos which is at 95% ...

  • /var/log/syslog shows these error messages when trying to connect...

Dec 3 XXXXXXXXXXXXXXXamazon-ssm-agent.amazon-ssm-agent[873]: 2023 -12-03 15:01:06 WARN EC2RoleProvider Failed to connect to Systems Manager with instance profile role credentials. Err: retrieved credentials failed to report to ssm. RequestId: XXXXXXXXXXXXXXX Error: AccessDeniedException: User: XXXXXXXXXXXXXXX:assumed-role/AmazonLightsailInstanceRole/XXXXXXXXXXXXXXX is not authorized to perform: ssm:UpdateInstanceInformation on resource: arn:aws:ec2:us-east-XXXXXXXXXXXXXXX:instance/i-XXXXXXXXXXXXXXX because no identity-based policy allows the ssm:UpdateInstanceInformation action

Dec 3 15:01:06 XXXXXXXXXXXXXXX amazon-ssm-agent.amazon-ssm-agent[873]: #011 status code: 400, request id: XXXXXXXXXXXXXXX

Dec 3 15:01:07 ip-XXXXXXXXXXXXXXX amazon-ssm-agent.amazon-ssm-agent[873]: 2023-12-03 15:01:06 ERROR EC2RoleProvider Failed to connect to Systems Manager with SSM role credentials. error calling RequestManagedInstanceRoleToken: AccessDeniedException: Systems Manager's instance management role is not configured for account: XXXXXXXXXXXXXXX

Dec 3 15:01:07 ip-XXXXXXXXXXXXXXX amazon-ssm-agent.amazon-ssm-agent[873]: #011 status code: 400, request id: XXXXXXXXXXXXXXX

asked 5 months ago227 views
5 Answers
0
Accepted Answer

I figured it out! The key was still correct, HOWEVER< for some reason, the username must have changed. VERY strange why it changed, but it did. So I clicked to EDIT under EXISTING COMPUTE section in my Cloud9 configuration. Then I changed the user name that was listed in lightsail to the username as well. ALSO, before it all worked, I also had to change the path as well to /home/NEW_USER_NAME.

answered 5 months ago
0

Hi,

It looks like you ran the command using the Lightsail instance profile credentials to make the request. You have to paste in your credentials directly to have the proper permissions.

Thanks.

AWS
answered 5 months ago
  • Thank you for helping me! I was trying to simply connect from the AWS counsole. I didn't run any command on my cloud 9 because it won't let me connect to see my cloud 9 instance to even get a command prompt.

  • It looks like you're using the Lightsail instance profile credentials. You have to paste in your credentials directly to have the proper permissions.

    Let us know if you have any other questions.

0

I am confused why there would be a credential problem since it was working a few months ago. Also, I thought if it was a credential issue it would just fail right away instead of taking 5 minutes to fail. Let me check my .ssh/authorized_keys with the AWS keys to make sure they're the same.

answered 5 months ago
0

So, it DID work.

However, after logging in, it asked me to increase the number of "iNodes" and instructed me to run this command:

sudo bash -c 'echo "fs.inotify.max_user_watches=524288" >> /etc/sysctl.conf' && sudo sysctl -p

After running that command, I clicked to refresh the Cloud9 instance. Now it once again is showing the same original error message again about T2 or T3 instances. ALSO, I am now unable to even login via the lightsail console!

answered 5 months ago
0

After restarting my server again it once again seems to be fine.

answered 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions