The specified Security Group and Parameter Group are not set in the RDS instance

If the Terraform apply execution times out during the RDS instance creation, the specified Security Group and Parameter Group is not set in the RDS instance. The solution is to set the timeout in the aws_db_instance resource. When a multi-az RDS instance is launched from a snapshot, the process can take more than 55 minutes. The default …

SQL Server AWS RDS instance ALARM FreeableMemory <=... MB

The SQL database servers use the available memory for caching to speed up the database operation. If we do not restrict the SQL database server memory usage, the operating system will not have enough memory to run. This setting is also necessary for an AWS RDS instance, otherwise, you will get the alert ALARM FreeableMemory <=… MB In AWS …

Failed to complete #create action: [undefined method `version’ for nil:NilClass] on …

When you execute kitchen converge to launch an EC2 instance in AWS with Chef Test Kitchen, you get the error message: >>>>> ——Exception——- >>>>>> Class: Kitchen::ActionFailed >>>>>> Message: 1 actions failed. >>>>>> Failed to complete #create action: [undefined method `version’ for nil:NilClass] on … >>>>>> ———————- >>>>>> Please see .kitchen/logs/kitchen.log for more details >>>>>> Also …

Could not load the ‘ec2’ driver from the load path

When you execute kitchen list and the driver in your .kitchen file is “ec2“, the following error message appears: >>>> ——Exception——- >>>>>> Class: Kitchen::ClientError >>>>>> Message: Could not load the ‘ec2’ driver from the load path. Please ensure that your driver is installed as a gem or included in your Gemfile if using Bundler. >>>>>> ———————- …

CloudExceptions::CloudException – 400: VPCIdNotSpecified: No default VPC for this user

When you launch a new EC2 instance in the AWS cloud from the command line or with other cloud management platforms, you may get the error message: CloudExceptions::CloudException – 400: VPCIdNotSpecified: No default VPC for this user (RequestID: …) This can happen when the specified Subnet Id is not a valid subnet in the selected …

Create the AWS credentials file from a Chef Data Bag

When a process on a server instance needs access to an AWS account, the user who will execute the AWS CLI commands needs to be able to automatically authenticate in AWS. For automatic AWS authentication, the AWS CLI creates two files in the .aws directory: config and credentials. The location of this directory depends on the …

Get AWS SSL Certificate resource ids from existing Load Balancers

To launch an Elastic Load Balancer ( ELB ) with an existing SSL certificate using Terraform, you need to specify the AWS certificate resource id. If you have already uploaded the certificate and attached it to an existing load balancer, the following AWS CLI command will display it in the command window. MY_PROFILE is the name of the …

Convert PEM files to PPK to use them in PuTTY

When you create a key in AWS you can download it one time in PEM format. To use it in PuTTY, the free SSH and Telnet client, you have to convert it to PPK format. To install PuTTY, see the Terminal Emulator section in Recommended utilities for your workstation To convert a PEM file to PPK Open a …

Error waiting for instance (i-…) to become ready: unexpected state ‘terminated’, wanted target ‘running’

When you launch a server instance with Terraform, sometimes the error message does not contain the underlying cause. When the cloud provider cannot complete the request, many times Terraform displays a generic error message: Error waiting for instance (i-…) to become ready: unexpected state ‘terminated’, wanted target ‘running’ To find the root cause of the …

Upgrade a server on an AWS EC2 instance with minimum risk and downtime

When you need to upgrade an application on an AWS EC2 instance with minimum downtime, there are many options. Upgrade an EC2 instance Stop the application, so users don’t make more changes, Create a backup of the database (snapshot of the RDS instance), Create a backup of the server (backup image of the EC2 instance), …