@Override public ResourceAction perform(ResourceAction resourceAction) throws Exception { AWSEC2SubnetRouteTableAssociationResourceAction action = (AWSEC2SubnetRouteTableAssociationResourceAction) resourceAction; ServiceConfiguration configuration = Topology.lookup(Compute.class); // See if route table is there action.checkRouteTableExists(configuration); // See if subnet is there action.checkSubnetExists(configuration); String associationId = action.associateRouteTable( configuration, action.properties.getSubnetId(), action.properties.getRouteTableId()); action.info.setPhysicalResourceId(associationId); action.info.setCreatedEnoughToDelete(true); action.info.setReferenceValueJson( JsonHelper.getStringFromJsonNode(new TextNode(action.info.getPhysicalResourceId()))); return action; }