How to create an AWS EC2 instance in CloudFormation
Create an EC2 Instance in CloudFormation
If you need to create an EC2 instance in CloudFormation, then you can do the following: …
Read Article →131 articles about cli development, tools, and best practices
If you need to create an EC2 instance in CloudFormation, then you can do the following: …
Read Article →If you need to run a command, or set of commands on an AWS ECS cluster container, then you can do the following:
aws ecs execute-command --cluster …
Read Article →
If you need to enable Container Insights for an ECS cluster, by using the AWS CLI, then you can do the following:
aws ecs update-cluster-settings …
Read Article →
This guide showcases the ability to use imported certificates from a third party provider (e.g. Venafi) in ACM, mount them in EFS and use them …
Read Article →If you need to increase the disk size of a Cloud9 instance, you can run the following script directly from the terminal in Cloud9:
pip3 install --user …
Read Article →
If you need to get the IAM Role information from the attached EC2 role directly, you can do the following:
IAM_ROLE=$(curl -s …
Read Article →
If you need to create an Elastic Container Registry (ECR) Repository from the AWS CLI, you can do the following:
aws ecr create-repository \ …
Read Article →
When you create the Amazon ECS service, it includes three Amazon ECS task replicas. You can see this by using the describe-services command, which …
Read Article →For more information about the Amazon ECS cluster, run the following command. You will find the number of running tasks, capacity providers, and more. …
Read Article →If you get the following error:
Read timeout on endpoint URL: …
Read Article →
If you have a Certificate Key that includes a Passphrase and you need to remove it, potentially to use it with AWS App Mesh, then you can do the …
Read Article →If you need to check if a volume is mounted in a Bash script, then you can do the following.
First we need to determine …
Read Article →If you need to check if a bash variable is empty, or unset, then you can use the following code:
if [ -z "${VAR}" ];
The above code will check …
Read Article →If you use the du command to list all the file sizes on Linux:
du
# or
du -h # Human readable
Then you would have noticed that they are not ordered by …
Read Article →If you need to resize an EBS volume in AWS, you can do so using bash.
bash fileCreate a bash file called resize.sh:
#!/bin/bash …
Read Article →
AWS CodeCommit is a git code repository service by Amazon Web Services.
You will want to clone your repository and setup your remotes using credential …
Sometimes you will need to manually approve a SageMaker model package from the AWS CLI.
aws sagemaker …
Read Article →
If you need to recursively delete all files in an AWS S3 bucket, then you can do the following:
aws s3 rm --recursive s3://your-bucket-name/foo/bar/ …
Read Article →
If you need to get the CPU Frequency in Linux, then you can run the following command:
watch -n.1 "grep \"^[c]pu MHz\" /proc/cpuinfo"
Read Article →
If you get the Instance Profile already exists error when running your Terraform apply, then it is either because an instance profile with that name …
If you are using aws configure sso to populate your ~/.aws/credentials file and you get the following error when you try and reauthorize, then you can …
If you need to match a string in a file, then grep is your friend.
grepLet’s take a file called somefile.txt
this
is
a
test …
Read Article →
If you want to invoke an AWS Lambda from your CLI, then the best option is to have the AWS CLI installed.
Getting started with the AWS CLI – AWS …
Read Article →Sometimes you might want to exit a command if a variable is not set in Bash.
You can do this as follows:
if [ -z "$VARIABLE_NAME" ]; then echo …
Read Article →