Skip to content

Instantly share code, notes, and snippets.

@Millward2000
Millward2000 / infra.yaml
Last active July 25, 2021 18:51
sample cloudformation snippet
Parameters:
AvailabilityZones:
Description: 'List of Availability Zones to use for the subnets in the VPC. Note: The logical order is preserved.'
Type: List<AWS::EC2::AvailabilityZone::Name>
KeyName:
Description: The existing AWS Key that you would like to use
Type: AWS::EC2::KeyPair::KeyName
Default: af-south-1
Environment:
Description: Launch a larger instance type if this is Production otherwise use a smaller instance type if preferred
@Millward2000
Millward2000 / awsLabNotes
Created July 25, 2021 10:59
Rough notes on the setup to test out a sample webapp
===AWS lab notes===
1. Create an AWS Account by following the sign up procedure here:
https://portal.aws.amazon.com/gp/aws/developer/registration/index.html?refid=em_127222
- Be sure to read through the Free Tier program, and understand the pricing of the various services you would like to test out
https://aws.amazon.com/free/?trk=ps_a134p000003yHmhAAE&trkCampaign=acq_paid_search_brand&sc_channel=PS&sc_campaign=acquisition_EEM&sc_publisher=Google&sc_category=Core&sc_country=EEM&sc_geo=EMEA&sc_outcome=acq&sc_detail=%2Baws%20%2Baccount&sc_content=Account_bmm&sc_segment=444219541886&sc_medium=ACQ-P|PS-GO|Brand|Desktop|SU|AWS|Core|EEM|EN|Text&s_kwcid=AL!4422!3!444219541886!b!!g!!%2Baws%20%2Baccount&ef_id=Cj0KCQjwl_SHBhCQARIsAFIFRVUAlWTtGczivDWEv6RygwNdCWkr-0CJUIcbG9y78Kfud28rByODiU8aAt9YEALw_wcB:G:s&s_kwcid=AL!4422!3!444219541886!b!!g!!%2Baws%20%2Baccount&all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all#Lea
@Millward2000
Millward2000 / tgw.yaml
Created October 5, 2021 08:07
Transit Gateway base template
Description: Base Template for TGW testing with three VPCs
Parameters:
AvailabilityZones:
Description: 'Lists of Availability Zones to use for the subnets in the VPC. Note: The logical order is preserved.'
Type: List<AWS::EC2::AvailabilityZone::Name>
cgwPublicIp:
Type: String
Description: The public IP address of the customer side VPN Appliance
Default: '1.1.1.1'
cidrVpcA:
@Millward2000
Millward2000 / DEMO Script
Created October 5, 2021 09:26
SSM details added to TGW
DEMO Script
-----------
===S3 Bucket Policy===
!D! - Demo
- Website - create a web server by following the creation option on a bucket
- first upload the files using aws s3 sync from the cli
- aws s3 sync ~/saa/s3-demo/website s3://millwam.com
- bucket properties - enable web at the bottom
@Millward2000
Millward2000 / tgw.yaml
Created August 31, 2022 14:14
TGW with three VPCs and optional VPN using strongswan on EC2
Description: Base Template for TGW testing with three VPCs
Parameters:
AvailabilityZones:
Description: 'Lists of Availability Zones to use for the subnets in the VPC. Note: The logical order is preserved.'
Type: List<AWS::EC2::AvailabilityZone::Name>
createCgw:
Type: String
Description: If you want to create a CGW with an existing public IP address and attach it to the TGW, choose true
AllowedValues: ['True','False']
Default: 'False'
Networking Notes
================
VPC Basics
- dualstack for v4 and v6
- v6 bounded by v4 (number of v6 addresses)
- Dedicated or default tenancy
- 5 Addresses reserved per subnet
- number of tiers and AZs affect subnet design
- implicit router uses the .1 address
Notes
-----
Below is a rough draft of the demos that were used during the course - please feel free to use and modify as you wish in a non-production account
Demo 1 - Create a cluster and provision the Cluster AutoScaler
------
1. Fire up an EC2 Instance
- attach a role to it
################################################################################
#
# Conformance Pack:
# Operational Best Practices for Amazon S3.
#
# Modified to use an input parameter identifying exempted resources
################################################################################
Resources:
S3BucketLevelPublicAccessProhibited: