Skip to content

Instantly share code, notes, and snippets.

View AHaydar's full-sized avatar

Ali Haydar AHaydar

View GitHub Profile
@AHaydar
AHaydar / template1.yml
Created November 8, 2020 01:15
CloudFormation
Resources:
Ec2Instance:
Type: AWS::EC2::Instance
Properties:
InstanceType: t2.micro
ImageId: ami-0947d2ba12ee1ff75 # Amazon Linux AMI in us-east-1
@AHaydar
AHaydar / template2.yml
Last active November 8, 2020 02:06
CloudFormation
Resources:
Ec2Instance:
Type: AWS::EC2::Instance
Properties:
InstanceType: t2.micro
ImageId: ami-0947d2ba12ee1ff75 # Amazon Linux AMI in us-east-1
Tags:
- Key: Name
Value: My EC2 Instance
- Key: Owner
@AHaydar
AHaydar / template3.yml
Created November 13, 2020 22:00
CloudFormation
Resources:
Ec2Instance:
Type: AWS::EC2::Instance
Properties:
InstanceType: t2.micro
ImageId: ami-0947d2ba12ee1ff75 # Amazon Linux AMI in us-east-1
KeyName: ec2-instances
Tags:
- Key: Name
Value: My EC2 Instance
@AHaydar
AHaydar / template4.yml
Created November 14, 2020 08:52
CloudFormation
Resources:
Ec2Instance:
Type: AWS::EC2::Instance
Properties:
InstanceType: t2.micro
ImageId: ami-0947d2ba12ee1ff75 # Amazon Linux AMI in us-east-1
KeyName: ec2-instances
Tags:
- Key: Name
Value: My EC2 Instance
@AHaydar
AHaydar / template5.yml
Created November 16, 2020 05:38
CloudFormation
Resources:
Ec2Instance:
Type: AWS::EC2::Instance
Properties:
InstanceType: t2.micro
ImageId: ami-0947d2ba12ee1ff75 # Amazon Linux AMI in us-east-1
KeyName: ec2-instances
Tags:
- Key: Name
Value: My EC2 Instance
@AHaydar
AHaydar / custom-vpc.yml
Last active March 13, 2021 19:03
CloudFormation template to create a secure VPC, Subnets, Bastion Host, and a VM within the private subnet
AWSTemplateFormatVersion: "2010-09-09"
Description: Custom vpc, subnets, route table.
Parameters:
KeyName:
Description: EC2 KeyPair
Type: AWS::EC2::KeyPair::KeyName
Resources:
VPC:
@AHaydar
AHaydar / main.tf
Created April 22, 2022 14:16
Terraform example for DynamoDB table, Lambda, and IAM to allow the Lambda to scan the table
provider "aws" {
profile = "default"
region = "ap-southeast-2"
}
module "company_table" {
source = "terraform-aws-modules/dynamodb-table/aws"
name = "company"