From cf37545cf3f9a5786cd62c77f71ca26e8871281b Mon Sep 17 00:00:00 2001 From: Jak Devaney Date: Fri, 23 Aug 2024 17:51:27 +0100 Subject: [PATCH 1/2] Modernised the instance type and block device size --- server-hosting/server-hosting-stack.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server-hosting/server-hosting-stack.ts b/server-hosting/server-hosting-stack.ts index d19355b..d2e88c1 100644 --- a/server-hosting/server-hosting-stack.ts +++ b/server-hosting/server-hosting-stack.ts @@ -67,7 +67,7 @@ export class ServerHostingStack extends Stack { const server = new ec2.Instance(this, `${prefix}Server`, { // 2 vCPU, 8 GB RAM should be enough for most factories - instanceType: new ec2.InstanceType("m5a.large"), + instanceType: new ec2.InstanceType("m6a.large"), // get exact ami from parameter exported by canonical // https://discourse.ubuntu.com/t/finding-ubuntu-images-with-the-aws-ssm-parameter-store/15507 machineImage: ec2.MachineImage.fromSsmParameter("/aws/service/canonical/ubuntu/server/20.04/stable/current/amd64/hvm/ebs-gp2/ami-id"), @@ -75,7 +75,7 @@ export class ServerHostingStack extends Stack { blockDevices: [ { deviceName: "/dev/sda1", - volume: ec2.BlockDeviceVolume.ebs(15), + volume: ec2.BlockDeviceVolume.ebs(30, {volumeType: ec2.EbsDeviceVolumeType.GP3}), } ], // server needs a public ip to allow connections From 30e7fbda248fd3b178eed66ca3d0258bcd354f3e Mon Sep 17 00:00:00 2001 From: Jak Devaney Date: Fri, 23 Aug 2024 17:57:01 +0100 Subject: [PATCH 2/2] Incresed from a .large instance type to .xlarge to match recommended specs --- server-hosting/server-hosting-stack.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server-hosting/server-hosting-stack.ts b/server-hosting/server-hosting-stack.ts index d2e88c1..fd6f024 100644 --- a/server-hosting/server-hosting-stack.ts +++ b/server-hosting/server-hosting-stack.ts @@ -67,7 +67,7 @@ export class ServerHostingStack extends Stack { const server = new ec2.Instance(this, `${prefix}Server`, { // 2 vCPU, 8 GB RAM should be enough for most factories - instanceType: new ec2.InstanceType("m6a.large"), + instanceType: new ec2.InstanceType("m6a.xlarge"), // get exact ami from parameter exported by canonical // https://discourse.ubuntu.com/t/finding-ubuntu-images-with-the-aws-ssm-parameter-store/15507 machineImage: ec2.MachineImage.fromSsmParameter("/aws/service/canonical/ubuntu/server/20.04/stable/current/amd64/hvm/ebs-gp2/ami-id"),