<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Steven Hatfield on Medium]]></title>
        <description><![CDATA[Stories by Steven Hatfield on Medium]]></description>
        <link>https://medium.com/@stevenhatfield23?source=rss-1b2ad195a34a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*JV-ONIsmwt618tqZ</url>
            <title>Stories by Steven Hatfield on Medium</title>
            <link>https://medium.com/@stevenhatfield23?source=rss-1b2ad195a34a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 20:51:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@stevenhatfield23/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Steps to install Terraform on an EC2 instance using Claude AI]]></title>
            <link>https://medium.com/@stevenhatfield23/steps-to-install-terraform-on-an-ec2-instance-using-claude-ai-200a149798b9?source=rss-1b2ad195a34a------2</link>
            <guid isPermaLink="false">https://medium.com/p/200a149798b9</guid>
            <category><![CDATA[s3-bucket]]></category>
            <category><![CDATA[terraform]]></category>
            <dc:creator><![CDATA[Steven Hatfield]]></dc:creator>
            <pubDate>Tue, 18 Mar 2025 23:36:35 GMT</pubDate>
            <atom:updated>2025-03-18T23:36:35.175Z</atom:updated>
            <content:encoded><![CDATA[<p>Steps to install Terraform on an EC2 instance using Claude AI</p><ol><li>log on to Claude AI and ask this from the Promt “Please provide Terraform code to create an S3 bucket in AWS with a unique name”</li></ol><h3>Create IAM Role for EC2</h3><ol><li>Log in to the AWS Management Console.</li><li>Navigate to the IAM dashboard.</li><li>Click “Roles” in the left sidebar, then “Create role”.</li><li>Choose “AWS service” as the trusted entity type and “EC2” as the use case.</li><li>Search for and attach the “AdministratorAccess” policy. Note: In a production environment, use a more restricted policy.</li><li>Name the role “EC2Admin” and provide a description.</li><li>Review and create the role.</li></ol><h3>Launch EC2 Instance</h3><ol><li>Go to the EC2 dashboard in the AWS Management Console.</li><li>Click “Launch Instance”.</li><li>Choose an Amazon Linux 2 AMI.</li><li>Select a t2.micro instance type.</li><li>Configure instance details:</li></ol><ul><li>Network: Default VPC</li><li>Subnet: Any available</li><li>Auto-assign Public IP: Enable</li><li>IAM role: Select “EC2Admin”</li></ul><ol><li>Keep default storage settings.</li><li>Add a tag: Key=”Name”, Value=”workstation”.</li><li>Create a security group allowing SSH access from EC2 Connect IP.</li><li>Review and launch, selecting or creating a key pair.</li></ol><h3>Step 4: Connect to EC2 Instance and Install Terraform</h3><ol><li>From the EC2 dashboard, select your “workstation” instance.</li><li>Click “Connect” and use the “EC2 Instance Connect” method.</li><li>In the browser-based SSH session, update system packages:</li></ol><p>sudo yum update -y<br>sudo yum install -y yum-utils<br>sudo yum-config-manager — add-repo <a href="https://rpm.releases.hashicorp.com/AmazonLinux/hashicorp.repo">https://rpm.releases.hashicorp.com/AmazonLinux/hashicorp.repo</a><br>sudo yum -y install terraform<br>terraform version</p><p><strong>Apply Terraform Configuration</strong></p><p>mkdir terraform-project &amp;&amp; cd terraform-project</p><p>vi main.tf</p><ol><li>Paste the Terraform code generated by Claude in Step 1.</li><li>Save and exit the editor (in nano, press Ctrl+X, then Y, then Enter).</li><li>Initialize Terraform:</li></ol><p>terraform init<br>terraform plan<br>terraform apply</p><h3>Verify S3 Bucket Creation</h3><ol><li>Use AWS CLI to list buckets:</li></ol><p>aws s3 ls</p><p><strong>Create the Cloud DynamoDB tables</strong></p><p>provider “aws” {<br> region = “us-east-1” <br>}</p><p># Tables DynamoDB<br>resource “aws_dynamodb_table” “cloudmart_products” {<br> name = “cloudmart-products”<br> billing_mode = “PAY_PER_REQUEST”<br> hash_key = “id”</p><p>attribute {<br> name = “id”<br> type = “S”<br> }<br>}</p><p>resource “aws_dynamodb_table” “cloudmart_orders” {<br> name = “cloudmart-orders”<br> billing_mode = “PAY_PER_REQUEST”<br> hash_key = “id”</p><p>attribute {<br> name = “id”<br> type = “S”<br> }<br>}</p><p>resource “aws_dynamodb_table” “cloudmart_tickets” {<br> name = “cloudmart-tickets”<br> billing_mode = “PAY_PER_REQUEST”<br> hash_key = “id”</p><p>attribute {<br> name = “id”<br> type = “S”<br> }<br>}</p><p>terraform apply</p><p>You have successfully used Clude to generate Terraform code , set up the EC2 workstation, installed Terraform and created a S3 bucket.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=200a149798b9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>