“Ran out of time waiting for the server with id” with Windows Server 2016 in Chef Test Kitchen

AWS changed how Windows Server EC2 instances send messages during boot. Windows Server 2012 R2 AWS EC2 instances sent the “Windows is ready” message every time those became available after boot. When a Windows Server 2016 AWS EC2 instance launches, it only sends the “Windows is ready” message during the first boot. If you create your custom …

Find the AWS account number

The AWS account number uniquely identifies the AWs account you are working with. All AWS “arn” identifiers contain it, and you need to know it when you want to share AMIs with other accounts. If there are no resources created yet in the account, you can find the account number in the “arn” of your user …

Execute Terraform scripts with Octopus

Terraform is a very powerful, free command-line tool to launch servers in any cloud or virtual machine environment. Hashicorp, the creator of Terraform just introduced the paid Terraform Enterprise server, that orchestrates the execution of the Terraform scripts. Octopus is another tool that added Terraform orchestration functionality in version 2018.3 In this example, we will set …

Open the system drive of an AWS instance you cannot log into

If you cannot log into an AWS instance and want to inspect files on it, you can detach the volume from the lost instance and attach it to another instance as the secondary drive. Create a new instance Create a new AWS instance and log into it, Make a note of the Instance ID of …

Create a new server image for a RightScale server template

The RightScale server templates publish server images to launch. It is advisable to create your own server image because the cloud providers can remove their published images anytime. If you generate your own image, you control the lifecycle of those. Create your own server image Use Packer to create a new server image. Install RightLink. On …

amazon-ebs: Error waiting for SSH: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

When you launch a Linux AWS EC2 instance with Terraform or create a Linux AWS image with Packer, one of the following errors are displayed: amazon-ebs: Error waiting for SSH: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain aws_instance.default: 1 error(s) occurred: * ssh: handshake failed: ssh: unable to …

Splunk App for AWS

To collect data from AWS install the Splunk App for AWS plugin. The app currently can collect information from AWS Config, Config Rules, CloudTrail, Inspector, CloudWatch, CloudWatch Logs, Billing, S3, Kinesis, Metadata. New data source To set up a new data source, click the Set up button Already set up data source To add a …

The instance ID ‘…’ does not exist

When you launch an EC2 instance in AWS and the Chef script is trying to set tags on the instance you may get the error message: The instance ID ‘…’ does not exist It can happen when you launch the instance in one AWS account, and the tagging script tries to find the instance in another …

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 …