Fail to run command /opt/aws/bin/cfn-init on EC2 instance latest AWS latest Linux 2023 image.

0

Hello, I use CloudFormation to deploy LAMP stack with Linux EC2 instance. The command cfn-init works fine if I use the AMI as described in the instruction link below. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/deploying.applications.html#deployment-walkthrough-lamp-install

However, if I change the AMI to the AWS Linux latest 2023, it doesn't work. I found the error message "Error occurred during build: Yum does not have php-mysqli available for installation" -However, I already install php-mysqli because it show mysqli when i run the command "php -m | grep mysqli" Why cfn-init doesn't work on the latest AMI AWS Linux latest 2023? Please advice. Regards, Hung Nguyen.

1 Answer
0

Double-check if the package name for mysqli is correct. While you mentioned that you installed php-mysqli, it's possible that the package name might differ on the latest AMI. You can try running yum search mysqli to get a list of available mysqli-related packages and ensure you have the correct one installed as compared to the previous AMI.

profile pictureAWS
answered a year 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