How to Bootstrap a Web Server on AWS EC2
When you launch an EC2 instance, you can use the user-data to bootstrap a instance creation script.
We can use the following code to start a web …
Read Article →165 articles about aws development, tools, and best practices
When you launch an EC2 instance, you can use the user-data to bootstrap a instance creation script.
We can use the following code to start a web …
Read Article →Ever searched for kubectl update config from aws eks and needed a quick result?
Make sure that you have valid AWS …
Read Article →If you have received the following error while trying to issue commands to kubectl:
Unable to connect to the server: dial tcp: lookup
Then it may be …
Read Article →Storing Terraform states files locally is not recommended. Instead you should use a backend such as as S3 from AWS.
To do this, you just need to add …
Read Article →You can use the AWS CLI to presign URLs so that objects in S3 can be shared publicly even if they are set as private.
Presigned URLs are great for …
Read Article →The AWS Cloud Development Kit (CDK) comes with numerous CLI commands.
| Command | Function … |
|---|
Here’s a minimal CloudFormation template for creating an S3 bucket with public read access. This is useful for hosting static assets like …
Read Article →It’s very easy to deploy a VPC using CloudFormation:
AWSTemplateFormatVersion: 2010-09-09
Description: Deploy a VPC
Resources:
VPC:
Type: …
Read Article →
Connect to the instance:
chmod 400 KEYPAIR.pem
ssh -i KEYPAIR.pem ec2-user@EC2PublicIP
Install Git:
sudo yum install -y git
Setup Git Credential …
Read Article →Create a new AWS EC2 instance, and set the User Script to the following:
This is handy for quick demos or testing — the instance comes up with Apache …
Read Article →If you need to query meta-data information from your running EC2 instance, you can curl the following location:
curl …
Read Article →
If you have just upgraded Ubuntu on your AWS g4dn instance and need to install/reinstall Cuda drivers for your Nvidia chipset, then you can run the …
Read Article →If you are automating AWS resources in Terraform, then you will want to not hardcode things as much as possible.
Terraform makes it possible to pull …
Read Article →If you get the following error when trying to run some Terraform:
error creating Appstream Fleet (): InvalidRoleException: AppStream 2.0 encountered …
AWS AppStream has finally made its way into the Terraform AWS Provider.
If you are using hashicorp/aws version 3.67 or above, then you can do the …
If you have ever received the following error is not authorized to create managed-rule when running a Step Function through Terraform’s AWS …
If you need to lock an AWS Lambda function down to a source account for security reasons (PCI.Lambda.1) then you can do so by using the source_account …
I needed to execute a Terraform null_resource provisioner (local-exec) block to run an awscli command, but assume a role passed down to it.
There was …
Read Article →Security groups are a critical component for securing resources in AWS. This guide will show you how to create and manage security groups in AWS using …
Read Article →Below is a simple CloudFormation script block to create a Security Group in AWS.
Resources:
SampleAppAppstreamSG:
Type: AWS::EC2::SecurityGroup …
Read Article →
AWS CloudFormation is very useful for creating template-able infrastructure definitions.
One of the sections of a template, is the Input Parameters, …
The AWS CLI comes with a useful subcommand to validate a CloudFormation template.
This catches syntax errors and basic structural issues before you …
Read Article →You may come across a message that reads similar to the following:
<meta charset="utf-8">Encoded authorization failure message
A full …
Read Article →AppStream (2.0) is a fully managed non-persistent desktop and application service for remotely accessing your work.
The ImageBuilder forms the first …