We will host our static website in AWS S3. Install the AWS SDK Node.js module Configure the AWS CLI with the access key and secret key in the ~/.aws/credentials file to access your AWS account. Host the static website of the client in an S3 bucket Create an S3 bucket using the AWS console To be able …
Tag Archives: AWS
Deploy a new version of a task in an ECS Fargate cluster
To deploy the new version of a Docker container image and launch new tasks with the new version Build and push the new Docker image Build the new Docker container image Push the new image to ECR (Elastic Container Registry) Create a new revision of the ECS Task Definition Open the ECS section of the …
Continue reading “Deploy a new version of a task in an ECS Fargate cluster”
Error: Failed to instantiate provider “aws” to obtain schema: Incompatible API version with plugin. Plugin version: 4, Client versions: [5]
When a provider has been updated outside of Terraform, (for example in Terraformer) Terraform can get out of sync with that provider version. terraform init works, but terraform plan throws the error message: Error: Failed to instantiate provider “aws” to obtain schema: Incompatible API version with plugin. Plugin version: 4, Client versions: [5] To update …
Error: Error creating LB Listener: ValidationError: ‘arn:aws:elasticloadbalancing:….b’ must be in ARN format
We create a new AWS Application Load Balancer and get this error message when the second listener is created Error: Error creating LB Listener: ValidationError: ‘arn:aws:elasticloadbalancing:….’ must be in ARN format make sure the region and AWS profile are correctly set for the new listener config.
You must specify a region. You can also configure your region by running “aws configure”.
When we execute an AWS CLI command, we need to supply the AWS Region. If it is not specified, we get the error message: You must specify a region. You can also configure your region by running “aws configure”. We can add the region with the –region command line argument, or store it in the …
How to duplicate a Windows server that is attached to the Windows Domain
When a Windows server is attached to a Domain only one instance of it can run at a time. To be able to duplicate the server and start a second instance of it Create an image of the server Remote into the server Make sure there is a local administrator account that you can log …
Continue reading “How to duplicate a Windows server that is attached to the Windows Domain”
Stop multiple untagged AWS EC2 instances with a Bash script
List all EC2 instances without a specific tag One day we have found 499 instances running in our account without any tags. Most likely someone accidentally started a process to launch those, so we needed a way to find them and stop them. Later we will terminate them with the same script below when we can make …
Continue reading “Stop multiple untagged AWS EC2 instances with a Bash script”
“incompatible-network” error when launching an AWS RDS instance
When the AWS subnet has no enough IP addresses Terraform displays the following error message: * aws_db_instance.default: unexpected state ‘incompatible-network’, wanted target ‘available, storage-optimization’. last error: %!s(<nil>) Make sure the subnet has enough available IP addresses.
Creating CentOS server images with Packer
The CentOS images are not available on the AWS Quick Start tab. CentOS publishes official images on the AWS Marketplace, but you need to subscribe to the image to be able to launch it with an automation software, like Terraform. Find the latest available CentOS image in the AWS Marketplace Execute this command to display the …
Continue reading “Creating CentOS server images with Packer”
SocketError: Error connecting to … Name or service not known
In an enterprise environment, the company usually operates its own DNS servers. When a Linux instance launches in AWS, the DNS settings only contain the AWS DNS server. If the company DNS server settings are applied with Chef, during the first Chef Client run those settings do not take effect. When we reference an internal DNS …
Continue reading “SocketError: Error connecting to … Name or service not known”