We will use CodeDeploy to automate the application deployment in our AWS ECS Fargate cluster. Create an AIM role for CodeDeploy to assume the ECS service role In the AWS console navigate IAM and click the Roles link Click the Create role button Click the CodeDeploy link Select CodeDeploy ECS Keep the default setting Enter […]
We have already created a Docker image for the server using Nginx. We will create an AWS ECS Fargate cluster in AWS and host the container there. Create an ECR repository for the image Select the Elastic Container Registry Create a new repository Enter a name, enable Tag immutability and Scan on push Select the repository you just […]
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 […]
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 […]
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:  To update […]
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.
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 […]
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 […]
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 […]
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.