Access Amazon ElastiCache for Memcached from an Amazon EC2 instance using Python

This note is the second part of my notes on Amazon ElastiCache for Memcached. In the first note, I demonstrated how to create an Amazon ElastiCache for Memcached using Terraform. In this note, I list the steps to create the additional infrastructure and access the Memcached cluster using Python. To accomplish the use-case, I'll use … Continue reading Access Amazon ElastiCache for Memcached from an Amazon EC2 instance using Python

Secure RDP Access to Amazon EC2 for Windows: Leveraging Fleet Manager and Session Manager

Fleet Manager is a service AWS Systems Manager provides to securely manage Amazon EC2 instances at scale. Cloud engineers can log in via remote desktop (RDP) to Amazon EC2 instances for Windows using Fleet Manager to perform troubleshooting or management tasks. Previously, a set of configurations were required to access an Amazon EC2 instance for … Continue reading Secure RDP Access to Amazon EC2 for Windows: Leveraging Fleet Manager and Session Manager

Install and configure CloudWatch Logs agent on Amazon EC2 instance for Windows using user data

Amazon CloudWatch is a monitoring and observability service that Amazon Web Services (AWS) provides. It monitors log files, collects and tracks metrics, sets alarms, and triggers actions to help AWS users ensure the health and performance of their applications and infrastructure resources. CloudWatch integrates with various AWS services, such as Amazon EC2, to provide comprehensive … Continue reading Install and configure CloudWatch Logs agent on Amazon EC2 instance for Windows using user data

Connect to an Amazon ElastiCache cluster from an Amazon EC2 instance using Python

This note continues my previous note on Amazon ElastiCache for Redis. In my earlier note, I demonstrated how to create an Amazon ElastiCache for the Redis cluster using Terraform and automate the process using GitHub Actions. In this note, I explain how to connect to the ElastiCache cluster using Python from an Amazon EC2 instance. … Continue reading Connect to an Amazon ElastiCache cluster from an Amazon EC2 instance using Python

Access AWS Secrets Manager secret from Amazon EC2 instance using Python

Per AWS-Docs, AWS Secrets Manager is a service to manage, retrieve, and rotate database credentials, application credentials, OAuth tokens, API keys, and other secrets throughout their lifecycles. Many AWS services store and use secrets in Secrets Manager. In this note, I demonstrate how to access the AWS Secrets Manager secret value using Python from an … Continue reading Access AWS Secrets Manager secret from Amazon EC2 instance using Python

Create an Amazon EC2 instance with Session Manager access using Terraform

Sometimes, connecting an EC2 instance after provisioning is necessary to verify whether the user-data script ran successfully, review if something is passing/failing, etc. As of August 2023, there are four ways of connecting to an Amazon EC2 instance running on Linux from the AWS console  -EC2 Instance Connect, Session Manager, SSH client, and EC2 serial … Continue reading Create an Amazon EC2 instance with Session Manager access using Terraform

Add an application load balancer to Amazon EC2 instances in a private subnet

In this note, I create a highly available environment using Amazon EC2 instances spread over multiple availability zones attached to an application load balancer. I also have a link to my GitHub repository with the code. In the past, I wrote a note on how to toggle traffic between three EC2 instances in three availability … Continue reading Add an application load balancer to Amazon EC2 instances in a private subnet

Add an application load balancer to Amazon EC2 using Terraform

A highly available application has a higher chance of attracting customers because they are assured of consistency in service. Load balancing is a cost-effective way to increase an application's availability. In this note, I describe the steps to add an application load balancer to three Amazon EC2 instances hosted in three public subnets in different … Continue reading Add an application load balancer to Amazon EC2 using Terraform

Create a web-server on Amazon EC2 instance using Terraform and user data

In this note, I detail all the steps required to create a bare-bone web server on Amazon EC2. I discuss creating the Amazon Virtual Private Cloud, subnets, internet gateway, security group, and Amazon EC2 instances to finally automate the process via Terraform and user data. Note: I did not include the concepts of load balancing, … Continue reading Create a web-server on Amazon EC2 instance using Terraform and user data

Download Amazon S3 bucket into an Amazon EC2 instance in 5 steps using user data and Terraform

I required a few files and folders on an Amazon EC2 instance as part of the provisioning process. So, the objective was to upload these files and folders into an Amazon S3 bucket and download them from the Amazon EC2 instance with the assistance of the user data script and Terraform. Note: As a reader … Continue reading Download Amazon S3 bucket into an Amazon EC2 instance in 5 steps using user data and Terraform