diff --git a/morph/grid/production/grid.nix b/morph/grid/production/grid.nix
index 52a96040b54cbf89d757628f3ca4db8477395351..3fa9e287d2cbbb9e5b8e03baaad5912003f99cae 100644
--- a/morph/grid/production/grid.nix
+++ b/morph/grid/production/grid.nix
@@ -21,8 +21,7 @@ let
     };
   };
 
-  payments = {name, ...}: {
-    networking.hostName = name;
+  payments = {
     imports = [
       gridlib.issuer
       gridlib.hardware-aws
@@ -33,8 +32,7 @@ let
     ];
   };
 
-  monitoring = {name, ...}: {
-    networking.hostName = name;
+  monitoring = {
     imports = [
       gridlib.monitoring
       gridlib.hardware-aws
diff --git a/morph/grid/testing/grid.nix b/morph/grid/testing/grid.nix
index 1534f08c765513da04a263c916f48ef4e859cb76..85cbe54057c3a234e36e66289725e5d46a6f197f 100644
--- a/morph/grid/testing/grid.nix
+++ b/morph/grid/testing/grid.nix
@@ -21,8 +21,7 @@ let
     };
   };
 
-  payments = {name, ...}: {
-    networking.hostName = name;
+  payments = {
     imports = [
       gridlib.issuer
       gridlib.hardware-aws
@@ -33,10 +32,10 @@ let
     ];
   };
 
-  storage001 = {name, ...}: {
-    networking.hostName = name;
+  storage001 = {
     imports = [
       gridlib.storage
+      gridlib.hardware-aws
       ./testing001-hardware.nix
       (gridlib.customize-storage (config // {
         monitoringvpnIPv4 = "172.23.23.12";
@@ -46,8 +45,7 @@ let
     ];
   };
 
-  monitoring = {name, ...}: {
-    networking.hostName = name;
+  monitoring = {
     imports = [
       gridlib.monitoring
       gridlib.hardware-aws
diff --git a/morph/grid/testing/testing001-hardware.nix b/morph/grid/testing/testing001-hardware.nix
index b57f193a6155a88be0af804fd6edd9a98043368a..5dceb16af1deaeb4668e67cbb65715ae79aa55d9 100644
--- a/morph/grid/testing/testing001-hardware.nix
+++ b/morph/grid/testing/testing001-hardware.nix
@@ -1,14 +1,4 @@
 {
-  imports = [ <nixpkgs/nixos/modules/virtualisation/amazon-image.nix> ];
-  ec2.hvm = true;
-  boot.kernel.sysctl = { "vm.swappiness" = 0; };
-  swapDevices = [ {
-    device = "/var/swapfile";
-    size = 8192; # megabytes
-    randomEncryption = true;
-  } ];
-
-
   boot.supportedFilesystems = [ "zfs" ];
   networking.hostId = "10000000";
 
diff --git a/morph/lib/issuer-aws.nix b/morph/lib/issuer-aws.nix
index 3febd796b3eceb5a2da73e4874d52d50767da947..16db454ee82cd86eebc2c7b53e8744107bd776d6 100644
--- a/morph/lib/issuer-aws.nix
+++ b/morph/lib/issuer-aws.nix
@@ -1,10 +1,5 @@
-{ lib, ... }: {
+{ name, lib, ... }: {
   imports = [ <nixpkgs/nixos/modules/virtualisation/amazon-image.nix> ];
-
-  # amazon-image.nix isn't quite aware of nvme-attached storage so give it a
-  # little help configuring grub.
-  boot.loader.grub.device = lib.mkForce "/dev/nvme0n1";
-
   ec2.hvm = true;
   boot.kernel.sysctl = { "vm.swappiness" = 0; };
   swapDevices = [ {
@@ -12,4 +7,14 @@
     size = 8192; # megabytes
     randomEncryption = true;
   } ];
+
+  # Break the tie between AWS and morph for the hostname by forcing the
+  # morph-supplied name.  See also
+  # <https://github.com/DBCDK/morph/issues/146>.
+  networking.hostName = name;
+
+  # amazon-image.nix isn't quite aware of nvme-attached storage so give it a
+  # little help configuring grub.
+  boot.loader.grub.device = lib.mkForce "/dev/nvme0n1";
+
 }